home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
gnu
/
amiga
/
gcc233.lha
/
src-patches
/
gcc-2.3.3-diff
next >
Wrap
Text File
|
1992-12-30
|
93KB
|
2,973 lines
diff -r2cN gcc-2.3.3/c-parse.y my-gcc-2.3.3/c-parse.y
*** gcc-2.3.3/c-parse.y Wed Oct 7 20:19:01 1992
--- my-gcc-2.3.3/c-parse.y Sat Nov 28 22:24:44 1992
***************
*** 854,858 ****
attrib
: IDENTIFIER
! { if (strcmp (IDENTIFIER_POINTER ($1), "packed"))
warning ("`%s' attribute directive ignored",
IDENTIFIER_POINTER ($1));
--- 854,865 ----
attrib
: IDENTIFIER
! {
! #ifdef HANDLE_ATTRIBUTE0
! /* give the function a chance to validate further attributes */
! if (HANDLE_ATTRIBUTE0 (IDENTIFIER_POINTER ($1)) ||
! strcmp (IDENTIFIER_POINTER ($1), "packed"))
! #else
! if (strcmp (IDENTIFIER_POINTER ($1), "packed"))
! #endif
warning ("`%s' attribute directive ignored",
IDENTIFIER_POINTER ($1));
diff -r2cN gcc-2.3.3/cccp.c my-gcc-2.3.3/cccp.c
*** gcc-2.3.3/cccp.c Wed Dec 30 00:11:02 1992
--- my-gcc-2.3.3/cccp.c Mon Dec 28 14:00:11 1992
***************
*** 40,43 ****
--- 40,57 ----
#endif /* not EMACS */
+ #ifdef amigados
+ /* since cpp uses alloca to store all its read files, this is quite deadly
+ on a system with non-automatic stackgrowth like amigados, so we better
+ turn it off now..
+
+ Note that it's not wise to generally inhibit __builtin_alloca, since
+ using the generic emulator entitels a serious (!) speed penalty, and
+ it's bad enough that we have to live with it in cccp, don't make cc1
+ unbearably slow as well... */
+ #undef alloca
+
+ static int amigados_abs_file ();
+ #endif
+
#ifndef STANDARD_INCLUDE_DIR
#define STANDARD_INCLUDE_DIR "/usr/include"
***************
*** 181,185 ****
--- 195,203 ----
extern struct tm *localtime ();
extern int sys_nerr;
+
+ #ifndef HAVE_STRERROR
extern char *sys_errlist[];
+ #define strerror(err) sys_errlist[err]
+ #endif
#ifndef errno
***************
*** 1673,1676 ****
--- 1691,1697 ----
char *p1 = p;
/* Discard all directory prefixes from P. */
+ #ifdef FILE_NAME_NONDIRECTORY
+ p = FILE_NAME_NONDIRECTORY (p);
+ #else
while (*p1) {
if (*p1 == '/')
***************
*** 1678,1681 ****
--- 1699,1703 ----
p1++;
}
+ #endif
/* Output P, but remove known suffixes. */
len = strlen (p);
***************
*** 3394,3398 ****
if (!no_output && already_output == 0
&& (kt->pass_thru
! || (kt->type == T_DEFINE
&& (dump_macros == dump_names
|| dump_macros == dump_definitions)))) {
--- 3416,3420 ----
if (!no_output && already_output == 0
&& (kt->pass_thru
! || ((kt->type == T_DEFINE || kt->type == T_UNDEF)
&& (dump_macros == dump_names
|| dump_macros == dump_definitions)))) {
***************
*** 3726,3729 ****
--- 3748,3763 ----
#ifndef VMS
ep = rindex (nam, '/');
+
+ #ifdef amigados
+ /* amigados uses unix-style directory-filename separation, but
+ has VMS-style logicals as well */
+
+ if (ep == NULL)
+ {
+ ep = rindex (nam, ':');
+ /* a ':' is part of the directory name, a '/' isn't ! */
+ if (ep != NULL) ep++;
+ }
+ #endif /* amigados */
#else /* VMS */
ep = rindex (nam, ']');
***************
*** 3801,3805 ****
--- 3835,3843 ----
/* If specified file name is absolute, just open it. */
+ #ifndef amigados
if (*fbeg == '/') {
+ #else
+ if (amigados_abs_filename (fbeg, flen)) {
+ #endif
strncpy (fname, fbeg, flen);
fname[flen] = 0;
***************
*** 3824,3827 ****
--- 3862,3869 ----
continue;
strcpy (fname, searchptr->fname);
+
+ #ifdef amigados
+ if (fname[strlen (fname) - 1] != ':')
+ #endif
strcat (fname, "/");
fname[strlen (fname) + flen] = 0;
***************
*** 7638,7642 ****
if (errno < sys_nerr)
! fprintf (stderr, "%s: %s\n", name, sys_errlist[errno]);
else
fprintf (stderr, "%s: undocumented I/O error\n", name);
--- 7680,7684 ----
if (errno < sys_nerr)
! fprintf (stderr, "%s: %s\n", name, strerror (errno));
else
fprintf (stderr, "%s: undocumented I/O error\n", name);
***************
*** 8539,8545 ****
char *name;
{
fprintf (stderr, "%s: ", progname);
! if (errno < sys_nerr)
! fprintf (stderr, "%s: %s\n", name, sys_errlist[errno]);
else
fprintf (stderr, "%s: undocumented I/O error\n", name);
--- 8581,8589 ----
char *name;
{
+ int error = errno;
+
fprintf (stderr, "%s: ", progname);
! if (error < sys_nerr)
! fprintf (stderr, "%s: %s\n", name, strerror (error));
else
fprintf (stderr, "%s: undocumented I/O error\n", name);
***************
*** 8917,8918 ****
--- 8961,8986 ----
}
#endif /* VMS */
+
+
+ #ifdef amigados
+
+ /* This function returns whether the LEN characters long filename FNAME
+ is an absolute path specification. */
+
+ static int
+ amigados_abs_filename (fname, len)
+ char *fname;
+ int len;
+ {
+ /* we're using ixemul.library, which treats `/foo' as `foo:', so
+ fname[0] is to be considered absolute as well */
+ if (fname[0] == '/')
+ return 1;
+
+ /* else do an index() on fname, but one which is limited to len characters */
+ while (*fname && *fname != ':' && len)
+ fname++, len--;
+
+ return *fname == ':';
+ }
+ #endif /* amigados */
diff -r2cN gcc-2.3.3/config/amigados.c my-gcc-2.3.3/config/amigados.c
*** gcc-2.3.3/config/amigados.c
--- my-gcc-2.3.3/config/amigados.c Sun Nov 29 13:41:42 1992
***************
*** 0 ****
--- 1,158 ----
+ /* Definitions of target machine for GNU compiler. amiga 68000/68020 version.
+ Copyright (C) 1992 Free Software Foundation, Inc.
+ Contributed by Markus M. Wild (wild@amiga.physik.unizh.ch).
+
+ This file is part of GNU CC.
+
+ GNU CC is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ GNU CC is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GNU CC; see the file COPYING. If not, write to
+ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+ #include "m68k.c"
+
+ /* Does operand (which is a symbolic_operand) live in text space? If
+ so SYMBOL_REF_FLAG, which is set by ENCODE_SECTION_INFO, will be true.
+
+ This function is used in base relative code generation. */
+
+ int
+ read_only_operand (operand)
+ rtx operand;
+ {
+ if (GET_CODE (operand) == CONST)
+ operand = XEXP (XEXP (operand, 0), 0);
+ if (GET_CODE (operand) == SYMBOL_REF)
+ return SYMBOL_REF_FLAG (operand) || CONSTANT_POOL_ADDRESS_P (operand);
+ return 1;
+ }
+
+
+ /* the rest of the file is to implement AmigaDOS specific keywords some day.
+ The approach used so far used __attribute__ for this, but this required
+ changes to c-parse.y as well as if we'd use the common keywords used
+ on commercial AmigaDOS C-compilers as well. So in the future I'll probably
+ switch to __saveds and __interrupt keywords as well.
+
+ The rest of this file is currently ignored, because it's no longer
+ working with the current gcc version. */
+
+ #if not_yet_working
+
+ #include "tree.h"
+
+ struct attribute {
+ tree ident;
+ int saveds : 1,
+ interrupt : 1;
+ };
+
+
+ static struct attribute *a_tab = 0;
+ static int a_index, a_size;
+
+ void
+ add_attr_entry (attr)
+ struct attribute *attr;
+ {
+ if (! a_tab)
+ {
+ a_size = 10;
+ a_index = 0;
+ a_tab = (struct attribute *) xmalloc (a_size * sizeof (struct attribute));
+ }
+
+ if (a_index == a_size)
+ {
+ a_size <<= 1;
+ a_tab = (struct attribute *) xrealloc (a_tab, a_size * sizeof (struct attribute));
+ }
+
+ a_tab[a_index++] = *attr;
+ }
+
+
+ void
+ attr_do_saveds (function_ident)
+ tree function_ident;
+ {
+ struct attribute attr, *a;
+ int i;
+
+ for (i = 0, a = a_tab; i < a_index; i++, a++)
+ if (a->ident == function_ident)
+ {
+ a->saveds = 1;
+ return;
+ }
+
+ /* create a new entry for this function */
+ attr.ident = function_ident;
+ attr.saveds = 1;
+ attr.interrupt = 0;
+ add_attr_entry (&attr);
+ }
+
+ void
+ attr_do_interrupt (function_ident)
+ tree function_ident;
+ {
+ struct attribute attr, *a;
+ int i;
+
+ for (i = 0, a = a_tab; i < a_index; i++, a++)
+ if (a->ident == function_ident)
+ {
+ /* __interrupt implies __saveds */
+ a->saveds = 1;
+ a->interrupt = 1;
+ return;
+ }
+
+ /* create a new entry for this function */
+ attr.ident = function_ident;
+ attr.saveds = 1;
+ attr.interrupt = 1;
+ add_attr_entry (&attr);
+ }
+
+ int
+ attr_does_saveds (function_name)
+ char *function_name;
+ {
+ tree ident = get_identifier (function_name);
+ struct attribute *attr;
+ int i;
+
+ for (i = 0, attr = a_tab; i < a_index; i++, attr++)
+ if (attr->ident == ident)
+ return attr->saveds;
+
+ return 0;
+ }
+
+ int
+ attr_does_interrupt (function_name)
+ char *function_name;
+ {
+ tree ident = get_identifier (function_name);
+ struct attribute *attr;
+ int i;
+
+ for (i = 0, attr = a_tab; i < a_index; i++, attr++)
+ if (attr->ident == ident)
+ return attr->interrupt;
+
+ return 0;
+ }
+
+ #endif
diff -r2cN gcc-2.3.3/config/amigados.h my-gcc-2.3.3/config/amigados.h
*** gcc-2.3.3/config/amigados.h
--- my-gcc-2.3.3/config/amigados.h Sat Nov 28 22:24:59 1992
***************
*** 0 ****
--- 1,377 ----
+ /* Definitions of target machine for GNU compiler. amiga 68000/68020 version.
+ Copyright (C) 1992 Free Software Foundation, Inc.
+ Contributed by Markus M. Wild (wild@amiga.physik.unizh.ch).
+
+ This file is part of GNU CC.
+
+ GNU CC is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ GNU CC is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GNU CC; see the file COPYING. If not, write to
+ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+ #include "m68k.h"
+
+ /* See tm-m68k.h. 0 means 68000 without 68881. */
+
+ #ifndef TARGET_DEFAULT
+ #define TARGET_DEFAULT 0
+ #endif
+
+ /* Define __HAVE_68881__ in preprocessor according to the -m flags.
+ This will control the use of inline 68881 insns in certain macros.
+ Also inform the program which CPU this is for. */
+
+ #if TARGET_DEFAULT & 02
+
+ /* -m68881 is the default */
+ #define CPP_SPEC \
+ "%{!msoft-float:-D__HAVE_68881__ }\
+ %{!ansi:%{m68000:-Dmc68010}%{mc68000:-Dmc68010}%{!mc68000:%{!m68000:-Dmc68020}}}"
+
+ #else
+
+ /* -msoft-float is the default, assume -mc68000 as well */
+ #define CPP_SPEC \
+ "%{m68881:-D__HAVE_68881__ }\
+ %{!ansi:%{m68020:-Dmc68020}%{mc68020:-Dmc68020}%{!mc68020:%{!m68020:-Dmc68010}}}"
+
+ #endif
+
+ /* -m68000 requires special flags to the assembler. */
+
+ #if TARGET_DEFAULT & 01
+
+ #define ASM_SPEC \
+ "%{m68000:-mc68010}%{mc68000:-mc68010}%{!mc68000:%{!m68000:-mc68020}} %{msmall-code:-l} "
+
+ #else
+
+ #define ASM_SPEC \
+ "%{m68020:-mc68020}%{mc68020:-mc68020}%{!mc68020:%{!m68020:-mc68010}} %{msmall-code:-l} "
+
+ #endif
+
+ /* amiga/amigados are the new "standard" defines for the Amiga, MCH_AMIGA
+ * was used before and is included for compatibility reasons */
+
+ #define CPP_PREDEFINES "-Dmc68000 -Damiga -Damigados -DMCH_AMIGA -DAMIGA"
+
+ /* Chose the right startup file, depending on whether we use base relative code,
+ base relative code with automatic relocation (-resident), or plain crt0.o.
+
+ Profiling is currently only available for plain startup.
+ mcrt0.o does not (yet) exist. */
+
+ #define STARTFILE_SPEC \
+ "%{resident:%{!fbaserel:-L gcc:blib }}%{fbaserel:-L gcc:blib }\
+ %{resident:rcrt0.o%s}%{!resident:%{!fbaserel:%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}%{fbaserel:%{pg:bgcrt0.o%s}%{!pg:%{p:bmcrt0.o%s}%{!p:bcrt0.o%s}}}}"
+
+
+ #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
+
+ /* if debugging, tell the linker to output amiga-hunk symbols *and*
+ a BSD compatible debug hunk (which will probably change in the future, it's not
+ tremendously useful in its current state). */
+
+ #define LINK_SPEC "%{g:-amiga-debug-hunk} %{fbaserel:-databss-together} %{resident:-databss-together -datadata-reloc} "
+
+ #define CC1_SPEC "%{resident:-fbaserel} "
+
+ #define CC1PLUS_SPEC "%{resident:-fbaserel} "
+
+ /* Omit frame pointer at high optimization levels. (This doesn't hurt, since
+ GDB doesn't work under AmigaDOS at the moment anyway..) */
+
+ #define OPTIMIZATION_OPTIONS(OPTIMIZE) \
+ { \
+ if (OPTIMIZE >= 2) \
+ flag_omit_frame_pointer = 1; \
+ }
+
+ /* provide a dummy entry for the small-code switch. This is currently only
+ needed by the assembler (explanations: m68k.h), but will be used by cc1
+ to output 16bit pc-relative code later. */
+
+ #undef TARGET_SWITCHES
+ #define TARGET_SWITCHES \
+ { { "68020", 5}, \
+ { "c68020", 5}, \
+ { "68881", 2}, \
+ { "bitfield", 4}, \
+ { "68000", -5}, \
+ { "c68000", -5}, \
+ { "soft-float", -0102}, \
+ { "nobitfield", -4}, \
+ { "rtd", 8}, \
+ { "nortd", -8}, \
+ { "short", 040}, \
+ { "noshort", -040}, \
+ { "fpa", 0100}, \
+ { "nofpa", -0100}, \
+ { "sky", 0200}, \
+ { "nosky", -0200}, \
+ { "68040", 0407}, \
+ { "68030", -01400}, \
+ { "68030", 7}, \
+ { "68040-only", 01000}, \
+ { "small-code", 0 }, \
+ { "", TARGET_DEFAULT}}
+
+ /* Every structure or union's size must be a multiple of 2 bytes. */
+
+ #define STRUCTURE_SIZE_BOUNDARY 16
+
+ /* This is (almost;-)) BSD, so it wants DBX format. */
+
+ #define DBX_DEBUGGING_INFO
+
+ /* Allow folding division by zero. */
+ #define REAL_INFINITY
+
+ /* This is how to output an assembler line defining a `double' constant. */
+
+ #undef ASM_OUTPUT_DOUBLE
+ #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
+ { \
+ if (REAL_VALUE_ISINF (VALUE)) \
+ fprintf (FILE, "\t.double 0r%s99e999\n", (VALUE) > 0 ? "" : "-"); \
+ else if (isnan (VALUE)) \
+ { \
+ union { double d; long l[2];} t; \
+ t.d = (VALUE); \
+ fprintf (FILE, "\t.long 0x%lx\n\t.long 0x%lx\n", t.l[0], t.l[1]); \
+ } \
+ else \
+ fprintf (FILE, "\t.double 0r%.17g\n", VALUE); \
+ }
+
+ /* This is how to output an assembler line defining a `float' constant. */
+
+ #undef ASM_OUTPUT_FLOAT
+ #define ASM_OUTPUT_FLOAT(FILE,VALUE) \
+ { \
+ if (REAL_VALUE_ISINF (VALUE)) \
+ fprintf (FILE, "\t.single 0r%s99e999\n", (VALUE) > 0 ? "" : "-"); \
+ else if (isnan (VALUE)) \
+ { \
+ union { float f; long l;} t; \
+ t.f = (VALUE); \
+ fprintf (FILE, "\t.long 0x%lx\n", t.l); \
+ } \
+ else \
+ fprintf (FILE, "\t.single 0r%.9g\n", VALUE); \
+ }
+
+ /* This is how to output an assembler lines defining floating operands.
+ There's no way to output a NaN's fraction, so we lose it. */
+
+ #undef ASM_OUTPUT_FLOAT_OPERAND
+ #define ASM_OUTPUT_FLOAT_OPERAND(FILE,VALUE) \
+ (REAL_VALUE_ISINF ((VALUE)) \
+ ? asm_fprintf (FILE, "%I0r%s99e999", ((VALUE) > 0 ? "" : "-")) \
+ : (VALUE) == -0.0 \
+ ? asm_fprintf (FILE, "%I0r-0.0") \
+ : asm_fprintf (FILE, "%I0r%.9g", (VALUE)))
+
+ #undef ASM_OUTPUT_DOUBLE_OPERAND
+ #define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE) \
+ (REAL_VALUE_ISINF ((VALUE)) \
+ ? asm_fprintf (FILE, "%I0r%s99e999", ((VALUE) > 0 ? "" : "-")) \
+ : (VALUE) == -0.0 \
+ ? asm_fprintf (FILE, "%I0r-0.0") \
+ : asm_fprintf (FILE, "%I0r%.17g", (VALUE)))
+
+
+ /* use A5 as framepointer instead of A6, this makes A6 available as a
+ general purpose register, and can thus be used without problems in
+ direct library calls. */
+
+ #undef FRAME_POINTER_REGNUM
+ #define FRAME_POINTER_REGNUM 13
+ #undef ARG_POINTER_REGNUM
+ #define ARG_POINTER_REGNUM 13
+
+ /* we use A4 for this, not A5, which is the framepointer */
+ #undef PIC_OFFSET_TABLE_REGNUM
+ #define PIC_OFFSET_TABLE_REGNUM 12
+
+ /* setup a default shell return value for those (gazillion..) programs that
+ (inspite of ANSI-C) declare main() to be void (or even VOID...) and thus
+ cause the shell to randomly caugh upon executing such programs (contrary
+ to Unix, AmigaDOS scripts are terminated with an error if a program returns
+ with an error code above the `error' or even `failure' level
+ (which is configurable with the FAILAT command) */
+
+ #define DEFAULT_MAIN_RETURN c_expand_return (integer_zero_node)
+
+ /* we do have an ansi-compliant c-library ;-) */
+ #define HAVE_VPRINTF
+ #define HAVE_VFPRINTF
+ #define HAVE_PUTENV
+ #define HAVE_STRERROR
+ #define HAVE_ATEXIT
+
+ /* given that symbolic_operand(X), return TRUE if no special
+ base relative relocation is necessary */
+
+ #define LEGITIMATE_BASEREL_OPERAND_P(X) \
+ (flag_pic >= 3 && read_only_operand (X))
+
+ #undef LEGITIMATE_PIC_OPERAND_P
+ #define LEGITIMATE_PIC_OPERAND_P(X) \
+ (! symbolic_operand (X, VOIDmode) || LEGITIMATE_BASEREL_OPERAND_P (X))
+
+
+ /* Define this macro if references to a symbol must be treated
+ differently depending on something about the variable or
+ function named by the symbol (such as what section it is in).
+
+ The macro definition, if any, is executed immediately after the
+ rtl for DECL or other node is created.
+ The value of the rtl will be a `mem' whose address is a
+ `symbol_ref'.
+
+ The usual thing for this macro to do is to a flag in the
+ `symbol_ref' (such as `SYMBOL_REF_FLAG') or to store a modified
+ name string in the `symbol_ref' (if one bit is not enough
+ information).
+
+ On the Amiga we use this to indicate if a symbol is in text or
+ data space. */
+
+ #define ENCODE_SECTION_INFO(DECL)\
+ do \
+ { \
+ if (TREE_CODE (DECL) == FUNCTION_DECL) \
+ SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1; \
+ else \
+ { \
+ rtx rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \
+ ? TREE_CST_RTL (DECL) : DECL_RTL (DECL)); \
+ if (RTX_UNCHANGING_P (rtl) && !MEM_VOLATILE_P (rtl)) \
+ SYMBOL_REF_FLAG (XEXP (rtl, 0)) = 1; \
+ } \
+ } \
+ while (0)
+
+ #undef SELECT_RTX_SECTION
+ #define SELECT_RTX_SECTION(MODE, X) readonly_data_section ();
+
+ /* according to varasm.c, RELOC referrs *only* to whether constants (!)
+ are addressed by address. This doesn't matter in baserelative code,
+ so we allow (inspite of flag_pic) readonly_data_section() in that
+ case */
+
+ #undef SELECT_SECTION
+ #define SELECT_SECTION(DECL, RELOC) \
+ { \
+ if (TREE_CODE (DECL) == STRING_CST) \
+ { \
+ if (! flag_writable_strings) \
+ readonly_data_section (); \
+ else \
+ data_section (); \
+ } \
+ else if (TREE_CODE (DECL) == VAR_DECL) \
+ { \
+ if ((flag_pic && flag_pic < 3 && RELOC) \
+ || !TREE_READONLY (DECL) || TREE_SIDE_EFFECTS (DECL)) \
+ data_section (); \
+ else \
+ readonly_data_section (); \
+ } \
+ else \
+ readonly_data_section (); \
+ }
+
+
+
+ #if not_yet_working
+
+ /* starting support for amiga specific keywords
+ * --------------------------------------------
+ */
+
+ /* validate attributes that don't take a parameter. Currently we support
+ * __attribute__ (saveds) and __attribute__ (interrupt)
+ */
+ #define HANDLE_ATTRIBUTE0(attr) \
+ (strcmp(attr, "saveds") != 0 && strcmp(attr, "interrupt") != 0)
+
+ /* (c-common.c)
+ * install additional attributes
+ */
+ #define HANDLE_EXTRA_ATTRIBUTES(a) \
+ if (TREE_VALUE (a) != 0 \
+ && TREE_CODE (TREE_VALUE (a)) == IDENTIFIER_NODE \
+ && TREE_VALUE (a) == get_identifier ("saveds")) \
+ { \
+ if (TREE_CODE (decl) != FUNCTION_DECL) \
+ { \
+ warning_with_decl (decl, \
+ "saveds attribute specified for non-function `%s'"); \
+ return; \
+ } \
+ \
+ attr_do_saveds (DECL_NAME (decl)); \
+ } \
+ else if (TREE_VALUE (a) != 0 \
+ && TREE_CODE (TREE_VALUE (a)) == IDENTIFIER_NODE \
+ && TREE_VALUE (a) == get_identifier ("interrupt")) \
+ { \
+ if (TREE_CODE (decl) != FUNCTION_DECL) \
+ { \
+ warning_with_decl (decl, \
+ "saveds attribute specified for non-function `%s'"); \
+ return; \
+ } \
+ \
+ attr_do_interrupt (DECL_NAME (decl)); \
+ } \
+
+
+ #define PROLOGUE_EXTRA_SAVE(mask) \
+ { extern char *current_function_name; \
+ /* saveds makes the function preserve d1/a0/a1 as well */ \
+ if (attr_does_saveds (current_function_name)) \
+ mask |= 0x40c0; } \
+
+
+ #define EPILOGUE_EXTRA_RESTORE(mask, nregs) \
+ { extern char *current_function_name; \
+ /* restore those extra registers */ \
+ if (attr_does_saveds (current_function_name)) \
+ { \
+ mask |= 0x0302; \
+ nregs += 3; \
+ } } \
+
+
+ #define EPILOGUE_EXTRA_BARRIER_KLUDGE(stream) \
+ { extern char *current_function_name; \
+ /* PLEASE Help! how is this done cleaner?? */ \
+ if (attr_does_saveds (current_function_name)) \
+ { \
+ fprintf (stderr, \
+ "warning: couldn't cleanup `saveds'-stack in `%s'.\n"); \
+ fprintf (stderr, \
+ " this is only ok, if the function never returns!\n"); \
+ } } \
+
+
+ #define EPILOGUE_EXTRA_TEST(stream) \
+ { extern char *current_function_name; \
+ /* with the interrupt-attribute, we have to set the cc before rts */ \
+ if (attr_does_interrupt (current_function_name)) \
+ asm_fprintf (stream, "\ttstl %s\n", reg_names[0]); } \
+
+ #endif
diff -r2cN gcc-2.3.3/config/m68k.c my-gcc-2.3.3/config/m68k.c
*** gcc-2.3.3/config/m68k.c Fri Oct 30 01:00:58 1992
--- my-gcc-2.3.3/config/m68k.c Sun Nov 29 13:39:58 1992
***************
*** 61,65 ****
finalize_pic ()
{
! if (flag_pic && current_function_uses_pic_offset_table)
emit_insn (gen_rtx (USE, VOIDmode, pic_offset_table_rtx));
}
--- 61,65 ----
finalize_pic ()
{
! if (flag_pic && (flag_pic < 3) && current_function_uses_pic_offset_table)
emit_insn (gen_rtx (USE, VOIDmode, pic_offset_table_rtx));
}
***************
*** 181,184 ****
--- 181,187 ----
num_saved_regs--;
}
+ #ifdef PROLOGUE_EXTRA_SAVE
+ PROLOGUE_EXTRA_SAVE (mask);
+ #endif
#if NEED_PROBE
***************
*** 214,218 ****
#endif
}
! if (flag_pic && current_function_uses_pic_offset_table)
{
#ifdef MOTOROLA
--- 217,221 ----
#endif
}
! if (flag_pic && (flag_pic < 3) && current_function_uses_pic_offset_table)
{
#ifdef MOTOROLA
***************
*** 282,285 ****
--- 285,291 ----
about which function the pc is in at this address. */
asm_fprintf (stream, "\tnop\n");
+ #ifdef EPILOGUE_EXTRA_BARRIER_KLUDGE
+ EPILOGUE_EXTRA_BARRIER_KLUDGE(stream);
+ #endif
return;
}
***************
*** 312,315 ****
--- 318,324 ----
mask |= 1 << regno;
}
+ #ifdef EPILOGUE_EXTRA_RESTORE
+ EPILOGUE_EXTRA_RESTORE(mask, nregs);
+ #endif
offset = foffset + nregs * 4;
if (offset + fsize >= 0x8000
***************
*** 514,517 ****
--- 523,529 ----
}
}
+ #ifdef EPILOGUE_EXTRA_TEST
+ EPILOGUE_EXTRA_TEST(stream);
+ #endif
if (current_function_pops_args)
asm_fprintf (stream, "\trtd %0I%d\n", current_function_pops_args);
***************
*** 804,816 ****
if (GET_CODE (orig) == SYMBOL_REF || GET_CODE (orig) == LABEL_REF)
{
if (reg == 0)
abort ();
! pic_ref = gen_rtx (MEM, Pmode,
! gen_rtx (PLUS, Pmode,
! pic_offset_table_rtx, orig));
current_function_uses_pic_offset_table = 1;
RTX_UNCHANGING_P (pic_ref) = 1;
emit_move_insn (reg, pic_ref);
return reg;
}
--- 816,838 ----
if (GET_CODE (orig) == SYMBOL_REF || GET_CODE (orig) == LABEL_REF)
{
+ #ifdef LEGITIMATE_BASEREL_OPERAND_P
+ if (LEGITIMATE_BASEREL_OPERAND_P (orig))
+ return orig;
+ #endif
+
if (reg == 0)
abort ();
! if (flag_pic >= 3)
! pic_ref = gen_rtx (PLUS, Pmode, pic_offset_table_rtx, orig);
! else
! pic_ref = gen_rtx (MEM, Pmode,
! gen_rtx (PLUS, Pmode,
! pic_offset_table_rtx, orig));
!
current_function_uses_pic_offset_table = 1;
RTX_UNCHANGING_P (pic_ref) = 1;
emit_move_insn (reg, pic_ref);
+
return reg;
}
***************
*** 841,844 ****
--- 863,867 ----
/* Likewise, should we set special REG_NOTEs here? */
}
+
return pic_ref;
}
***************
*** 1888,1891 ****
--- 1911,1918 ----
if ((flag_pic == 2) && (breg == pic_offset_table_rtx))
fprintf (file, ":l");
+ if ((flag_pic == 3) && (breg == pic_offset_table_rtx))
+ fprintf (file, ":W");
+ if ((flag_pic == 4) && (breg == pic_offset_table_rtx))
+ fprintf (file, ":L");
}
if (addr != 0 && ireg != 0)
diff -r2cN gcc-2.3.3/config/m68k.h my-gcc-2.3.3/config/m68k.h
*** gcc-2.3.3/config/m68k.h Thu Oct 22 07:12:03 1992
--- my-gcc-2.3.3/config/m68k.h Sat Nov 28 22:25:06 1992
***************
*** 328,334 ****
#define CONDITIONAL_REGISTER_USAGE \
! { \
! if (flag_pic) \
! fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
}
--- 328,337 ----
#define CONDITIONAL_REGISTER_USAGE \
! { \
! if (flag_pic) \
! fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
! /* prevent saving/restoring of the base reg */ \
! if (flag_pic == 3) \
! call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
}
diff -r2cN gcc-2.3.3/config/m68k.md my-gcc-2.3.3/config/m68k.md
*** gcc-2.3.3/config/m68k.md Mon Sep 28 13:37:59 1992
--- my-gcc-2.3.3/config/m68k.md Sat Nov 28 22:25:11 1992
***************
*** 705,715 ****
if (flag_pic && symbolic_operand (operands[1], SImode))
{
! /* The source is an address which requires PIC relocation.
! Call legitimize_pic_address with the source, mode, and a relocation
! register (a new pseudo, or the final destination if reload_in_progress
! is set). Then fall through normally */
! extern rtx legitimize_pic_address();
! rtx temp = reload_in_progress ? operands[0] : gen_reg_rtx (Pmode);
! operands[1] = legitimize_pic_address (operands[1], SImode, temp);
}
}")
--- 705,720 ----
if (flag_pic && symbolic_operand (operands[1], SImode))
{
! #ifdef LEGITIMATE_BASEREL_OPERAND_P
! if (flag_pic < 3 || !LEGITIMATE_BASEREL_OPERAND_P (operands[1]))
! #endif
! {
! /* The source is an address which requires PIC relocation.
! Call legitimize_pic_address with the source, mode, and a relocation
! register (a new pseudo, or the final destination if reload_in_progress
! is set). Then fall through normally */
! extern rtx legitimize_pic_address();
! rtx temp = reload_in_progress ? operands[0] : gen_reg_rtx (Pmode);
! operands[1] = legitimize_pic_address (operands[1], SImode, temp);
! }
}
}")
***************
*** 1712,1717 ****
/* These insns can result from reloads to access
stack slots over 64k from the frame pointer. */
! if (GET_CODE (operands[2]) == CONST_INT
! && INTVAL (operands[2]) + 0x8000 >= (unsigned) 0x10000)
return \"move%.l %2,%0\;add%.l %1,%0\";
#ifdef SGS
--- 1717,1723 ----
/* These insns can result from reloads to access
stack slots over 64k from the frame pointer. */
! if (((GET_CODE (operands[2]) == CONST_INT
! && INTVAL (operands[2]) + 0x8000 >= (unsigned) 0x10000))
! || (flag_pic == 4 && operands[1] == pic_offset_table_rtx))
return \"move%.l %2,%0\;add%.l %1,%0\";
#ifdef SGS
***************
*** 4652,4656 ****
"
{
! if (flag_pic && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF)
operands[0] = gen_rtx (MEM, GET_MODE (operands[0]),
force_reg (Pmode, XEXP (operands[0], 0)));
--- 4658,4662 ----
"
{
! if (flag_pic && flag_pic < 3 && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF)
operands[0] = gen_rtx (MEM, GET_MODE (operands[0]),
force_reg (Pmode, XEXP (operands[0], 0)));
***************
*** 4663,4667 ****
;; Operand 1 not really used on the m68000.
! "! flag_pic"
"*
#ifdef MOTOROLA
--- 4669,4673 ----
;; Operand 1 not really used on the m68000.
! "(! flag_pic || flag_pic >= 3)"
"*
#ifdef MOTOROLA
***************
*** 4678,4682 ****
;; Operand 1 not really used on the m68000.
! "flag_pic"
"*
return \"jsr %0\";
--- 4684,4688 ----
;; Operand 1 not really used on the m68000.
! "(flag_pic && flag_pic < 3)"
"*
return \"jsr %0\";
***************
*** 4694,4698 ****
"
{
! if (flag_pic && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF)
operands[1] = gen_rtx (MEM, GET_MODE (operands[1]),
force_reg (Pmode, XEXP (operands[1], 0)));
--- 4700,4704 ----
"
{
! if (flag_pic && flag_pic < 3 && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF)
operands[1] = gen_rtx (MEM, GET_MODE (operands[1]),
force_reg (Pmode, XEXP (operands[1], 0)));
***************
*** 4705,4709 ****
(match_operand:SI 2 "general_operand" "g")))]
;; Operand 2 not really used on the m68000.
! "! flag_pic"
"*
#ifdef MOTOROLA
--- 4711,4715 ----
(match_operand:SI 2 "general_operand" "g")))]
;; Operand 2 not really used on the m68000.
! "(! flag_pic || flag_pic >= 3)"
"*
#ifdef MOTOROLA
***************
*** 4720,4724 ****
(match_operand:SI 2 "general_operand" "g")))]
;; Operand 2 not really used on the m68000.
! "flag_pic"
"*
return \"jsr %1\";
--- 4726,4730 ----
(match_operand:SI 2 "general_operand" "g")))]
;; Operand 2 not really used on the m68000.
! "(flag_pic && flag_pic < 3)"
"*
return \"jsr %1\";
diff -r2cN gcc-2.3.3/config/t-amigados my-gcc-2.3.3/config/t-amigados
*** gcc-2.3.3/config/t-amigados
--- my-gcc-2.3.3/config/t-amigados Sat Nov 28 22:25:13 1992
***************
*** 0 ****
--- 1,81 ----
+ # compilation rules for target amigados. We generate two additional things:
+ # libngcc.a: a `normal' library, the automatically generated libgcc.a is
+ # base relative (which is the right thing, since it's used to
+ # generate further generations of compilers).
+ # gccs: a gcc calling ssytem() instead of forking. This makes it more
+ # system conformant, at the cost of reduced functionality (no
+ # -pipe option).
+
+ # the provided file is POSIX compliant
+ LIMITS_H =
+
+ # we don't need a libgcc1, it's all in ixemul.library
+ LIBGCC1 = libgcc1.null
+
+ # use flags that don't generate base relative objects. So -resident
+ # would be a bad idea..
+ LIBNGCC2_CFLAGS = -O2 $(INTERNAL_CFLAGS) $(CFLAGS) -B./
+
+ # this is later copied into gcc:compilers/amiga/<version>/libgcc.a, whereas
+ # libgcc.a is copied into gcc:blib/libgcc.a, which is searched first if we're
+ # compiling/linking base relative
+ EXTRA_PARTS = libngcc.a
+
+ # this includes the knowledge that target amigados doesn't need
+ # libgcc1.a at all
+ libngcc.a: libgcc2.c libgcc2.ready $(CONFIG_H) $(LIB2FUNCS_EXTRA) \
+ longlong.h gbl-ctors.h config.status
+ # Actually build it in tmplibngcc.a, then rename at end,
+ # so that libngcc.a itself remains nonexistent if compilation is aborted.
+ -rm -f tmplibngcc.a
+ # -e causes any failing command to make this rule fail.
+ # -e doesn't work in certain shells, so we test $$? as well.
+ set -e; \
+ for name in $(LIB2FUNCS); \
+ do \
+ echo $${name}; \
+ $(GCC_FOR_TARGET) $(LIBNGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \
+ $(srcdir)/libgcc2.c -o $${name}.o; \
+ if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
+ $(AR) $(AR_FLAGS) tmplibngcc.a $${name}.o; \
+ rm -f $${name}.o; \
+ done
+ # Some shells crash when a loop has no items.
+ # So make sure there is always at least one--`..'.
+ # Then ignore it.
+ # We don't use -e here because there are if statements
+ # that should not make the command give up when the if condition is false.
+ # Instead, we test for failure after each command where it matters.
+ -for file in .. $(LIB2FUNCS_EXTRA); \
+ do \
+ if [ x$${file} != x.. ]; then \
+ name=`echo $${file} | sed -e 's/[.]c$$//' -e 's/[.]asm$$//'`; \
+ echo $${name}; \
+ if [ $${name}.asm = $${file} ]; then \
+ cp $${file} $${name}.s; file=$${name}.s; \
+ if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
+ else true; fi; \
+ $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c $${file}; \
+ if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
+ $(AR) $(AR_FLAGS) tmplibngcc.a $${name}.o; \
+ rm -f $${name}.[so]; \
+ else true; \
+ fi; \
+ done
+ mv tmplibngcc.a libngcc.a
+ ranlib libngcc.a
+
+ T_CPPFLAGS = -DAMIGADOS_FORK_GCC
+ # the default gcc (xgcc) specifies -DAMIGADOS_FORK_GCC. This gcc (gccs) does not.
+ EXTRA_PASSES = gccs
+
+ gccs: gccs.o version.o $(LIBDEPS)
+ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o gccs gccs.o version.o $(LIBS)
+
+ # omit the T_CPPFLAGS here on purpose to get rid of -DAMIGADOS_FORK_GCC
+ gccs.o: gcc.c $(CONFIG_H) gvarargs.h obstack.h
+ $(CC) $(ALL_CFLAGS) $(CPPFLAGS) $(X_CPPFLAGS) $(INCLUDES) \
+ -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \
+ -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-lib/\" \
+ -DDEFAULT_TARGET_MACHINE=\"$(target)\" \
+ -c `echo $(srcdir)/gcc.c | sed 's,^\./,,'` -o gccs.o
diff -r2cN gcc-2.3.3/config/x-amigados my-gcc-2.3.3/config/x-amigados
*** gcc-2.3.3/config/x-amigados
--- my-gcc-2.3.3/config/x-amigados Sat Nov 28 22:25:15 1992
***************
*** 0 ****
--- 1,50 ----
+ # building under amigados requires an already working gcc. You can of course
+ # try to reinvent the wheel, get sun2manx and try to do a crosscompile from a
+ # sun3, like I did some years ago...
+ CC = gccv # this is a gcc compiled with AMIGADOS_FORK_GCC
+ # if your gcc has not been compiled with -DAMIGADOS_FORK_GCC, then don't use
+ # -pipe! (see also t-amigados !)
+ # The -fno-builtin is necessary, or gcc uses the builtin alloca() by default,
+ # and we can't undef it for cpp
+ X_CFLAGS = -O2 -resident -pipe -fno-builtin
+
+ exec_prefix = gcc:compilers
+ bindir = gcc:bin
+ libdir = gcc:lib
+ manext = .0
+ mandir = gcc:man/man1
+
+ # don't compile with debugging, as long as there is no debugger...
+ LIBGCC2_CFLAGS = -O2 $(GCC_CFLAGS)
+
+ # we really shouldn't specify CFLAGS from here, but there's no other way
+ # to get rid of the `-g' indoctrinated by Makefile.in...
+ CFLAGS =
+
+ RANLIB_TEST = true
+ RANLIB = ranlib
+
+ # override the default compilation rule for libgcc.a, since the original
+ # rule doesn't work well with the amigados ksh (the subshell cd'ing into
+ # tmplibgcc is still running when the rm -fr tmplibgcc is started, and at
+ # that point trying to remove the directory fails because the previous
+ # process still keeps a lock (its current directory) to that directory).
+
+ # Combine the various libraries into a single library, libgcc.a.
+ libgcc.a: $(LIBGCC1) $(LIBGCC2)
+ -rm -rf tmplibgcc.a libgcc.a tmpcopy
+ mkdir tmpcopy
+ -if [ x$(LIBGCC1) != x ]; \
+ then (cd tmpcopy; $(AR) x ../$(LIBGCC1)); \
+ else true; \
+ fi
+ # the cd .. make sure there's no lock left on tmpcopy (this is actually a
+ # bug in ixemul.library, but I can't get around it currently because it
+ # involves an OS bug which is beyond my capabilities to fix...)
+ (cd tmpcopy; $(AR) x ../$(LIBGCC2); cd ..; /c/wait 2)
+ (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *.o; cd ..; /c/wait 2)
+ rm -rf tmpcopy
+ -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi
+ # Actually build it in tmplibgcc.a, then rename at end,
+ # so that libgcc.a itself remains nonexistent if compilation is aborted.
+ mv tmplibgcc.a libgcc.a
diff -r2cN gcc-2.3.3/config/xm-amigados.h my-gcc-2.3.3/config/xm-amigados.h
*** gcc-2.3.3/config/xm-amigados.h
--- my-gcc-2.3.3/config/xm-amigados.h Sat Nov 28 22:25:17 1992
***************
*** 0 ****
--- 1,234 ----
+ /* Configuration for GNU C-compiler for Commodore Amiga, running AmigaDOS.
+ Copyright (C) 1992 Free Software Foundation, Inc.
+ Contributed by Markus M. Wild (wild@amiga.physik.unizh.ch).
+
+ This file is part of GNU CC.
+
+ GNU CC is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ GNU CC is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GNU CC; see the file COPYING. If not, write to
+ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+ /* first include the generic header, then modify some parts.. */
+
+ #include "xm-m68k.h"
+
+ #undef GCC_INCLUDE_DIR
+ #define GCC_INCLUDE_DIR ":GCC_INCLUDE_DIR is not used under AmigaDOS!:"
+
+ /* use this list of header files instead of the Unix'ish default */
+ #define INCLUDE_DEFAULTS \
+ { \
+ { "gcc:g++-include", 1}, \
+ { "gcc:gcc-include", 0}, /* gcc-specific changes to system headers. none currently.. */ \
+ { "gcc:os-include", 0}, /* here go amiga specific headers */ \
+ { "gcc:include", 0}, /* here go the usual headers */ \
+ { 0, 0} \
+ }
+
+
+ /* here live the compiler passes like cc1, cc1plus, cpp etc */
+ #undef STANDARD_EXEC_PREFIX
+ #define STANDARD_EXEC_PREFIX "gcc:compilers/"
+
+ /* here live (%|b|r)crt0.o and different flavors of link-libraries */
+ #undef STANDARD_STARTFILE_PREFIX
+ #define STANDARD_STARTFILE_PREFIX "gcc:lib/"
+
+ /* the `compilers' place looks better, since we have the machine/version tree
+ there, and not in `lib'. */
+ #undef STD_PROTO_DIR
+ #define STD_PROTO_DIR STANDARD_EXEC_PREFIX
+
+ /* Fork one piped subcommand. SEARCH_FLAG is the system call to use
+ (either execv or execvp). ARGV is the arg vector to use.
+ NOT_LAST is nonzero if this is not the last subcommand
+ (i.e. its output should be piped to the next one.) */
+
+ #ifndef AMIGADOS_FORK_GCC
+ /* this version uses a more or less amigados-conformant way of running a
+ program (in the context of the parent). If you want to use -pipe however,
+ you'll have to use the vfork() version afterwards. */
+
+ #define PEXECUTE(SEARCH_FLAG,PROGRAM,ARGV,NOT_LAST) \
+ ({char *_argline; \
+ int _arglinelength, _i; \
+ \
+ for (_i = 1, _arglinelength=0; ARGV[_i]; ++_i) \
+ _arglinelength += strlen(ARGV[_i]) + 1; \
+ \
+ _arglinelength += strlen(PROGRAM) + 1; \
+ \
+ if (!(_argline = (char *)alloca(_arglinelength))) \
+ pfatal_with_name ("alloca"); \
+ \
+ strcpy(_argline, PROGRAM); \
+ for (_i = 1; ARGV[_i]; ++_i) \
+ { \
+ strcat(_argline, " "); \
+ strcat(_argline, ARGV[_i]); \
+ } \
+ \
+ ssystem(_argline); }) \
+
+ #define PEXECUTE_RESULT(STATUS, COMMAND) \
+ ({ STATUS = COMMAND.pid; })
+
+ #else
+
+ /* the vfork() version. This one has the drawback, that gcc is not
+ interruptible when started from make, since ixemul.library doesn't yet
+ propagate ^C to subprocesses. */
+
+ #define PEXECUTE(SEARCH_FLAG,PROGRAM,ARGV,NOT_LAST) \
+ ({int (*_func)() = (SEARCH_FLAG ? execv : execvp); \
+ int _pid; \
+ int _pdes[2]; \
+ int _input_desc = last_pipe_input; \
+ int _output_desc = STDOUT_FILE_NO; \
+ int _retries, _sleep_interval, _result; \
+ \
+ /* If this isn't the last process, make a pipe for its output, \
+ and record it as waiting to be the input to the next process. */ \
+ \
+ if (NOT_LAST) \
+ { \
+ if (pipe (_pdes) < 0) \
+ pfatal_with_name ("pipe"); \
+ _output_desc = _pdes[WRITE_PORT]; \
+ last_pipe_input = _pdes[READ_PORT]; \
+ } \
+ else \
+ last_pipe_input = STDIN_FILE_NO; \
+ \
+ /* Fork a subprocess; wait and retry if it fails. */ \
+ _sleep_interval = 1; \
+ for (_retries = 0; _retries < 4; _retries++) \
+ { \
+ _pid = vfork (); \
+ if (_pid >= 0) \
+ break; \
+ sleep (_sleep_interval); \
+ _sleep_interval *= 2; \
+ } \
+ \
+ switch (_pid) \
+ { \
+ case -1: \
+ pfatal_with_name ("vfork"); \
+ /* NOTREACHED */ \
+ _result = 0; \
+ break; \
+ \
+ case 0: /* child */ \
+ /* Move the input and output pipes into place, if nec. */ \
+ if (_input_desc != STDIN_FILE_NO) \
+ { \
+ close (STDIN_FILE_NO); \
+ dup (_input_desc); \
+ close (_input_desc); \
+ } \
+ if (_output_desc != STDOUT_FILE_NO) \
+ { \
+ close (STDOUT_FILE_NO); \
+ dup (_output_desc); \
+ close (_output_desc); \
+ } \
+ \
+ /* Close the parent's descs that aren't wanted here. */ \
+ if (last_pipe_input != STDIN_FILE_NO) \
+ close (last_pipe_input); \
+ \
+ /* Exec the program. */ \
+ (*_func) (PROGRAM, ARGV); \
+ perror_exec (PROGRAM); \
+ exit (-1); \
+ /* NOTREACHED */ \
+ _result = 0; \
+ break; \
+ \
+ default: \
+ /* In the parent, after forking. \
+ Close the descriptors that we made for this child. */ \
+ if (_input_desc != STDIN_FILE_NO) \
+ close (_input_desc); \
+ if (_output_desc != STDOUT_FILE_NO) \
+ close (_output_desc); \
+ \
+ /* Return child's process number. */ \
+ _result = _pid; \
+ break; \
+ } \
+ _result; }) \
+
+ #define PEXECUTE_RESULT(STATUS, COMMAND) \
+ ({ wait (& STATUS); })
+
+ #endif /* AMIGADOS_FORK_GCC */
+
+ /* the following macros are stolen more or less from xm-vms.h ... */
+
+ /* This macro is used to help compare filenames in cp-lex.c.
+
+ We also need to make sure that the names are all lower case, because
+ we must be able to compare filenames to determine if a file implements
+ a class. */
+
+ #define FILE_NAME_NONDIRECTORY(C) \
+ ({ \
+ char * pnt_ = (C), * pnt1_; \
+ pnt1_ = pnt_ - 1; \
+ while (*++pnt1_) \
+ if ((*pnt1_ >= 'A' && *pnt1_ <= 'Z')) *pnt1_ |= 0x20; \
+ pnt1_ = rindex (pnt_, '/'); \
+ pnt1_ = (pnt1_ == 0 ? rindex (pnt_, ':') : pnt1_); \
+ (pnt1_ == 0 ? pnt_ : pnt1_ + 1); \
+ })
+
+ /* Macro to generate the name of the cross reference file. The standard
+ one does not work, since it was written assuming that the conventions
+ of a unix style filesystem will work on the host system.
+
+ Contrary to VMS, I'm using the original unix filename, there's no reason
+ not to use this under AmigaDOS. */
+
+ #define XREF_FILE_NAME(BUFF, NAME) \
+ s = FILE_NAME_NONDIRECTORY (NAME); \
+ if (s == NAME) sprintf(BUFF, ".%s.gxref", NAME); \
+ else { \
+ unsigned char ch = *s; /* could be Latin1 char.. */ \
+ /* temporary: cut the filename from the directory */\
+ *s = 0; \
+ sprintf (BUFF, "%s.%c%s.gxref", NAME, ch, s+1); \
+ /* and restore the filename */ \
+ *s = ch; \
+ } \
+
+ /* Macro that is used in cp-xref.c to determine whether a file name is
+ absolute or not.
+
+ This checks for both, '/' as first character, since we're running under
+ ixemul.library which provides for this unix'ism, and for the usual
+ logical-terminator, ':', somewhere in the filename. */
+
+ #define FILE_NAME_ABSOLUTE_P(NAME) (NAME[0] == '/' || index(NAME, ':'))
+
+
+ /* the colon conflicts with the name space of logicals */
+
+ #define PATH_SEPARATOR ','
+
+ /* AmigaDOS handles rename(2) *much* better than any link(2)/unlink(2)
+ hacks. It's actually the inverse case as on Unix. rename(2) was always
+ there, link(2) is new with OS 2.0 */
+
+ #define HAVE_rename 1
diff -r2cN gcc-2.3.3/configure my-gcc-2.3.3/configure
*** gcc-2.3.3/configure Wed Dec 30 00:12:04 1992
--- my-gcc-2.3.3/configure Mon Dec 28 14:01:50 1992
***************
*** 477,480 ****
--- 477,487 ----
broken_install=yes
;;
+ m68k-*-amigados)
+ xm_file=xm-amigados.h
+ out_file=amigados.c
+ tm_file=amigados.h
+ tmake_file=t-amigados
+ xmake_file=x-amigados
+ ;;
m68k-cbm-sysv4*) # Commodore variant of V.4.
tm_file=amix.h
diff -r2cN gcc-2.3.3/expr.c my-gcc-2.3.3/expr.c
*** gcc-2.3.3/expr.c Sat Nov 28 22:08:51 1992
--- my-gcc-2.3.3/expr.c Sat Nov 28 22:25:30 1992
***************
*** 1978,1981 ****
--- 1978,1987 ----
argvec = (struct arg *) alloca (nargs * sizeof (struct arg));
+ /* how would you do this RIGHT ?? fake a DECL node? dunno... */
+ #ifdef ENCODE_SECTION_INFO
+ /* mark it as a function (to be in the text section that is) */
+ SYMBOL_REF_FLAG (fun) = 1;
+ #endif
+
INIT_CUMULATIVE_ARGS (args_so_far, (tree)0, fun);
diff -r2cN gcc-2.3.3/gcc.c my-gcc-2.3.3/gcc.c
*** gcc-2.3.3/gcc.c Wed Dec 30 00:12:54 1992
--- my-gcc-2.3.3/gcc.c Mon Dec 28 14:02:56 1992
***************
*** 105,109 ****
--- 105,113 ----
extern int errno, sys_nerr;
+ #ifndef HAVE_STRERROR
+ /* provide a cheap strerror() emulator for those that don't have it */
extern char *sys_errlist[];
+ #define strerror(err) sys_errlist[err]
+ #endif
extern int execv (), execvp ();
***************
*** 1127,1130 ****
--- 1131,1137 ----
if (base == (char *)0)
{
+ #ifdef amigados
+ base = "ram:";
+ #else
if (access ("/usr/tmp", R_OK | W_OK) == 0)
base = "/usr/tmp/";
***************
*** 1131,1134 ****
--- 1138,1142 ----
else
base = "/tmp/";
+ #endif
}
}
***************
*** 1137,1143 ****
temp_filename = xmalloc (len + sizeof("/ccXXXXXX"));
strcpy (temp_filename, base);
! if (len > 0 && temp_filename[len-1] != '/')
! temp_filename[len++] = '/';
! strcpy (temp_filename + len, "ccXXXXXX");
mktemp (temp_filename);
--- 1145,1153 ----
temp_filename = xmalloc (len + sizeof("/ccXXXXXX"));
strcpy (temp_filename, base);
! if (len > 0 && temp_filename[len-1] != '/'
! #ifdef amigados
! && temp_filename[len-1] != ':'
! #endif
! )
mktemp (temp_filename);
***************
*** 1211,1214 ****
--- 1221,1225 ----
int first_time = TRUE;
struct prefix_list *pprefix;
+ char path_sep[] = { PATH_SEPARATOR, 0 };
obstack_grow (&collect_obstack, env_var, strlen (env_var));
***************
*** 1221,1225 ****
{
if (!first_time)
! obstack_grow (&collect_obstack, ":", 1);
first_time = FALSE;
--- 1232,1236 ----
{
if (!first_time)
! obstack_grow (&collect_obstack, path_sep, 1);
first_time = FALSE;
***************
*** 1231,1235 ****
{
if (!first_time)
! obstack_grow (&collect_obstack, ":", 1);
first_time = FALSE;
--- 1242,1246 ----
{
if (!first_time)
! obstack_grow (&collect_obstack, path_sep, 1);
first_time = FALSE;
***************
*** 1241,1245 ****
{
if (!first_time)
! obstack_grow (&collect_obstack, ":", 1);
first_time = FALSE;
--- 1252,1256 ----
{
if (!first_time)
! obstack_grow (&collect_obstack, path_sep, 1);
first_time = FALSE;
***************
*** 1274,1278 ****
/* Determine the filename to execute (special case for absolute paths). */
! if (*name == '/')
{
if (access (name, mode))
--- 1285,1293 ----
/* Determine the filename to execute (special case for absolute paths). */
! if (*name == '/'
! #ifdef amigados
! || index (name, ':')
! #endif
! )
{
if (access (name, mode))
***************
*** 1480,1483 ****
--- 1495,1499 ----
(i.e. its output should be piped to the next one.) */
+ #ifndef PEXECUTE
#ifndef OS2
#ifdef __MSDOS__
***************
*** 1626,1629 ****
--- 1642,1646 ----
}
#endif /* not OS2 */
+ #endif /* !defined (PEXECUTE) */
/* Execute the command specified by the arguments on the current line of spec.
***************
*** 1720,1726 ****
--- 1737,1749 ----
char *string = commands[i].argv[0];
+ #ifdef PEXECUTE
+ commands[i].pid = PEXECUTE (string != commands[i].prog,
+ string, commands[i].argv,
+ i + 1 < n_commands);
+ #else
commands[i].pid = pexecute (string != commands[i].prog,
string, commands[i].argv,
i + 1 < n_commands);
+ #endif
if (string != commands[i].prog)
***************
*** 1743,1746 ****
--- 1766,1772 ----
char *prog;
+ #ifdef PEXECUTE_RESULT
+ pid = PEXECUTE_RESULT (status, commands[i]);
+ #else /* PEXECUTE_RESULT */
#ifdef __MSDOS__
status = pid = commands[i].pid;
***************
*** 1748,1751 ****
--- 1774,1778 ----
pid = wait (&status);
#endif
+ #endif /* PEXECUTE_RESULT */
if (pid < 0)
abort ();
***************
*** 1854,1857 ****
--- 1881,1885 ----
{
strncpy (nstore, startp, endp-startp);
+ #ifndef amigados
if (endp == startp)
{
***************
*** 1865,1868 ****
--- 1893,1905 ----
else
nstore[endp-startp] = 0;
+ #else
+ if (endp[-1] != '/' && endp[-1] != ':')
+ {
+ nstore[endp-startp] = '/';
+ nstore[endp-startp+1] = 0;
+ }
+ else
+ nstore[endp-startp] = 0;
+ #endif
add_prefix (&exec_prefix, nstore, 0, 0, NULL_PTR);
if (*endp == 0)
***************
*** 1887,1890 ****
--- 1924,1928 ----
{
strncpy (nstore, startp, endp-startp);
+ #ifndef amigados
if (endp == startp)
{
***************
*** 1898,1901 ****
--- 1936,1948 ----
else
nstore[endp-startp] = 0;
+ #else
+ if (endp[-1] != '/' && endp[-1] != ':')
+ {
+ nstore[endp-startp] = '/';
+ nstore[endp-startp+1] = 0;
+ }
+ else
+ nstore[endp-startp] = 0;
+ #endif
add_prefix (&startfile_prefix, nstore, 0, 0, NULL_PTR);
/* Make separate list of dirs that came from LIBRARY_PATH. */
***************
*** 1923,1926 ****
--- 1970,1974 ----
{
strncpy (nstore, startp, endp-startp);
+ #ifndef amigados
if (endp == startp)
{
***************
*** 1934,1937 ****
--- 1982,1994 ----
else
nstore[endp-startp] = 0;
+ #else
+ if (endp[-1] != '/' && endp[-1] != ':')
+ {
+ nstore[endp-startp] = '/';
+ nstore[endp-startp+1] = 0;
+ }
+ else
+ nstore[endp-startp] = 0;
+ #endif
add_prefix (&startfile_prefix, nstore, 0, 0, NULL_PTR);
/* Make separate list of dirs that came from LIBRARY_PATH. */
***************
*** 3434,3437 ****
--- 3491,3497 ----
int len;
+ #ifdef FILE_NAME_NONDIRECTORY
+ input_basename = FILE_NAME_NONDIRECTORY (input_filename);
+ #else
input_basename = input_filename;
for (p = input_filename; *p; p++)
***************
*** 3438,3441 ****
--- 3498,3502 ----
if (*p == '/')
input_basename = p + 1;
+ #endif
/* Find a suffix starting with the last period,
***************
*** 3676,3680 ****
if (errno < sys_nerr)
! s = concat ("%s: ", sys_errlist[errno], "");
else
s = "cannot open %s";
--- 3737,3741 ----
if (errno < sys_nerr)
! s = concat ("%s: ", strerror (errno), "");
else
s = "cannot open %s";
***************
*** 3689,3693 ****
if (errno < sys_nerr)
! s = concat ("%s: ", sys_errlist[errno], "");
else
s = "cannot open %s";
--- 3750,3754 ----
if (errno < sys_nerr)
! s = concat ("%s: ", strerror (errno), "");
else
s = "cannot open %s";
***************
*** 3703,3707 ****
if (errno < sys_nerr)
s = concat ("installation problem, cannot exec %s: ",
! sys_errlist[errno], "");
else
s = "installation problem, cannot exec %s";
--- 3764,3768 ----
if (errno < sys_nerr)
s = concat ("installation problem, cannot exec %s: ",
! strerror (errno), "");
else
s = "installation problem, cannot exec %s";
diff -r2cN gcc-2.3.3/genconfig.c my-gcc-2.3.3/genconfig.c
*** gcc-2.3.3/genconfig.c Tue Oct 13 04:11:48 1992
--- my-gcc-2.3.3/genconfig.c Sat Nov 28 22:30:40 1992
***************
*** 304,309 ****
--- 304,317 ----
from the machine description file `md'. */\n\n");
+ #ifdef amigados
+ /* this constant probably better be 14 in general, or a cross compiling
+ host might choke on some amigados header files... */
+
+ /* Allow at least 14 operands for the sake of asm constructs. */
+ max_recog_operands = 14;
+ #else
/* Allow at least 10 operands for the sake of asm constructs. */
max_recog_operands = 9; /* We will add 1 later. */
+ #endif
max_dup_operands = 1;
diff -r2cN gcc-2.3.3/gstdarg.h my-gcc-2.3.3/gstdarg.h
*** gcc-2.3.3/gstdarg.h Sat Nov 28 22:09:30 1992
--- my-gcc-2.3.3/gstdarg.h Sun Nov 29 19:23:11 1992
***************
*** 1,141 ****
- /* stdarg.h for GNU.
- Note that the type used in va_arg is supposed to match the
- actual type **after default promotions**.
- Thus, va_arg (..., short) is not valid. */
-
- #ifndef _STDARG_H
- #ifndef _ANSI_STDARG_H_
- #ifndef __need___va_list
- #define _STDARG_H
- #define _ANSI_STDARG_H_
- #endif /* not __need___va_list */
- #undef __need___va_list
-
- #ifndef __GNUC__
- /* Use the system's macros with the system's compiler.
- This is relevant only when building GCC with some other compiler. */
#include <stdarg.h>
- #else
- #ifdef __m88k__
- #include <va-m88k.h>
- #else
- #ifdef __i860__
- #include <va-i860.h>
- #else
- #ifdef __hppa__
- #include <va-pa.h>
- #else
- #ifdef __mips__
- #include <va-mips.h>
- #else
- #ifdef __sparc__
- #include <va-sparc.h>
- #else
- #ifdef __i960__
- #include <va-i960.h>
- #else
- #ifdef __alpha__
- #include <va-alpha.h>
- #else
-
- /* Define __gnuc_va_list. */
-
- #ifndef __GNUC_VA_LIST
- #define __GNUC_VA_LIST
- #if defined(__svr4__) || defined(_AIX) || defined(_M_UNIX)
- typedef char *__gnuc_va_list;
- #else
- typedef void *__gnuc_va_list;
- #endif
- #endif
-
- /* Define the standard macros for the user,
- if this invocation was from the user program. */
- #ifdef _STDARG_H
-
- /* Amount of space required in an argument list for an arg of type TYPE.
- TYPE may alternatively be an expression whose type is used. */
-
- #define __va_rounded_size(TYPE) \
- (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int))
-
- #define va_start(AP, LASTARG) \
- (AP = ((__gnuc_va_list) __builtin_next_arg ()))
-
- #undef va_end
- void va_end (__gnuc_va_list); /* Defined in libgcc.a */
- #define va_end(AP)
-
- /* We cast to void * and then to TYPE * because this avoids
- a warning about increasing the alignment requirement. */
-
- #if defined (__arm__) || defined (__i386__) || defined (__ns32000__) || defined (__vax__)
- /* This is for little-endian machines; small args are padded upward. */
- #define va_arg(AP, TYPE) \
- (AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \
- *((TYPE *) (void *) ((char *) (AP) - __va_rounded_size (TYPE))))
- #else /* big-endian */
- /* This is for big-endian machines; small args are padded downward. */
- #define va_arg(AP, TYPE) \
- (AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \
- *((TYPE *) (void *) ((char *) (AP) - ((sizeof (TYPE) < 4 \
- ? sizeof (TYPE) \
- : __va_rounded_size (TYPE))))))
- #endif /* big-endian */
- #endif /* _STDARG_H */
-
- #endif /* not alpha */
- #endif /* not i960 */
- #endif /* not sparc */
- #endif /* not mips */
- #endif /* not hppa */
- #endif /* not i860 */
- #endif /* not m88k */
-
- #ifdef _STDARG_H
- /* Define va_list, if desired, from __gnuc_va_list. */
- /* We deliberately do not define va_list when called from
- stdio.h, because ANSI C says that stdio.h is not supposed to define
- va_list. stdio.h needs to have access to that data type,
- but must not use that name. It should use the name __gnuc_va_list,
- which is safe because it is reserved for the implementation. */
-
- #ifdef _HIDDEN_VA_LIST /* On OSF1, this means varargs.h is "half-loaded". */
- #undef _VA_LIST
- #endif
-
- #ifdef _BSD_VA_LIST
- #undef _BSD_VA_LIST
- #endif
-
- #ifdef __SVR4_2__
- /* SVR4.2 uses _VA_LIST for an internal alias for va_list,
- so we must avoid testing it and setting it here. */
- #ifndef _VA_LIST_
- #define _VA_LIST_
- typedef __gnuc_va_list va_list;
- #endif /* _VA_LIST_ */
- #else /* not __SVR4_2__ */
-
- /* The macro _VA_LIST_ is the same thing used by this file in Ultrix.
- But on BSD NET2 we must not test or define or undef it.
- (Note that the comments in NET 2's ansi.h
- are incorrect for _VA_LIST_--see stdio.h!) */
- #if !defined (_VA_LIST_) || defined (__BSD_NET2__) || defined (____386BSD____)
- /* The macro _VA_LIST is used in SCO Unix 3.2. */
- #ifndef _VA_LIST
- #if !(defined (__BSD_NET2__) || defined (____386BSD____))
- #define _VA_LIST_
- #endif
- #define _VA_LIST
- typedef __gnuc_va_list va_list;
- #endif /* not _VA_LIST */
- #endif /* not _VA_LIST_ */
-
- #endif /* not __SVR4_2__ */
-
- #endif /* _STDARG_H */
-
- #endif /* __GNUC__ */
- #endif /* not _ANSI_STDARG_H_ */
- #endif /* not _STDARG_H */
--- 1 ----
diff -r2cN gcc-2.3.3/gstddef.h my-gcc-2.3.3/gstddef.h
*** gcc-2.3.3/gstddef.h Sat Nov 28 22:09:32 1992
--- my-gcc-2.3.3/gstddef.h Sat Nov 28 22:30:42 1992
***************
*** 3,6 ****
--- 3,20 ----
#ifndef _ANSI_STDDEF_H
+ #ifdef amigados
+ /* GNU libc has special support in this file, 4.3bsd-net2 libc deserves that
+ just as well. The system headers are ANSI compliant, the used compiler IS
+ gcc, so it's really ok to use the system header, no reason to hassle
+ with a jungle of ifdefs. Besides, amigados is only defined if compiling
+ with host=amigados, it doesn't apply if compiling with target=amigados
+ on a different host with possibly different system headers. Same thing
+ would apply to gstdarg.h and gvarargs.h, but those headers are more
+ easily fixable than this one and I'm sick of writing the same comment
+ there as well. MW */
+ #include <stddef.h>
+
+ #else /* not amigados */
+
/* Any one of these symbols __need_* means that GNU libc
wants us just to define one data type. So don't define
***************
*** 147,150 ****
--- 161,166 ----
#define __WCHAR_TYPE__ int
#endif
+
+ #endif /* not amigados */
#ifdef __GNUG__
/* In C++, wchar_t is a distinct basic type,
diff -r2cN gcc-2.3.3/gvarargs.h my-gcc-2.3.3/gvarargs.h
*** gcc-2.3.3/gvarargs.h Sat Nov 28 22:09:36 1992
--- my-gcc-2.3.3/gvarargs.h Sat Nov 28 23:57:06 1992
***************
*** 1,155 ****
- #ifndef __GNUC__
- /* Use the system's macros with the system's compiler. */
#include <varargs.h>
- #else
- /* Record that this is varargs.h; this turns off stdarg.h. */
-
- #ifndef _VARARGS_H
- #define _VARARGS_H
-
- #ifdef __sparc__
- #include <va-sparc.h>
- #else
- #ifdef __spur__
- #include <va-spur.h>
- #else
- #ifdef __mips__
- #include <va-mips.h>
- #else
- #ifdef __i860__
- #include <va-i860.h>
- #else
- #ifdef __pyr__
- #include <va-pyr.h>
- #else
- #ifdef __m88k__
- #include <va-m88k.h>
- #else
- #if defined(__hppa__) || defined(hp800)
- #include <va-pa.h>
- #else
- #ifdef __i960__
- #include <va-i960.h>
- #else
- #ifdef __alpha__
- #include <va-alpha.h>
- #else
-
- #ifdef __NeXT__
-
- /* On Next, erase any vestiges of stdarg.h. */
-
- #ifdef _ANSI_STDARG_H_
- #define _VA_LIST_
- #endif
- #define _ANSI_STDARG_H_
-
- #undef va_alist
- #undef va_dcl
- #undef va_list
- #undef va_start
- #undef va_end
- #undef __va_rounded_size
- #undef va_arg
- #endif /* __NeXT__ */
-
- /* In GCC version 2, we want an ellipsis at the end of the declaration
- of the argument list. GCC version 1 can't parse it. */
-
- #if __GNUC__ > 1
- #define __va_ellipsis ...
- #else
- #define __va_ellipsis
- #endif
-
- /* These macros implement traditional (non-ANSI) varargs
- for GNU C. */
-
- #define va_alist __builtin_va_alist
- /* The ... causes current_function_varargs to be set in cc1. */
- #define va_dcl int __builtin_va_alist; __va_ellipsis
-
- /* Define __gnuc_va_list, just as in gstdarg.h. */
-
- #ifndef __GNUC_VA_LIST
- #define __GNUC_VA_LIST
- #if defined(__svr4__) || defined(_AIX) || defined(_M_UNIX)
- typedef char *__gnuc_va_list;
- #else
- typedef void *__gnuc_va_list;
- #endif
- #endif
-
- #define va_start(AP) AP=(char *) &__builtin_va_alist
-
- #define va_end(AP)
-
- #define __va_rounded_size(TYPE) \
- (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int))
-
- #if defined (__arm__) || defined (__i386__) || defined (__ns32000__) || defined (__vax__)
- /* This is for little-endian machines; small args are padded upward. */
- #define va_arg(AP, TYPE) \
- (AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \
- *((TYPE *) (void *) ((char *) (AP) - __va_rounded_size (TYPE))))
- #else /* big-endian */
- /* This is for big-endian machines; small args are padded downward. */
- #define va_arg(AP, TYPE) \
- (AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \
- *((TYPE *) (void *) ((char *) (AP) - ((sizeof (TYPE) < 4 \
- ? sizeof (TYPE) \
- : __va_rounded_size (TYPE))))))
- #endif /* big-endian */
-
- #endif /* not alpha */
- #endif /* not i960 */
- #endif /* not hppa */
- #endif /* not m88k */
- #endif /* not pyr */
- #endif /* not i860 */
- #endif /* not mips */
- #endif /* not spur */
- #endif /* not sparc */
- #endif /* not _VARARGS_H */
-
- /* Define va_list from __gnuc_va_list. */
-
- #ifdef _HIDDEN_VA_LIST /* On OSF1, this means varargs.h is "half-loaded". */
- #undef _VA_LIST
- #endif
-
- #ifdef __SVR4_2__
-
- /* SVR4.2 uses _VA_LIST for an internal alias for va_list,
- so we must avoid testing it and setting it here. */
- #ifndef _VA_LIST_
- #define _VA_LIST_
- typedef __gnuc_va_list va_list;
- #endif /* _VA_LIST_ */
-
- #else /* not __SVR4_2__ */
-
- /* The macro _VA_LIST_ is the same thing used by this file in Ultrix.
- But on BSD NET2 we must not test or define or undef it.
- (Note that the comments in NET 2's ansi.h
- are incorrect for _VA_LIST_--see stdio.h!) */
- #if !defined (_VA_LIST_) || defined (__BSD_NET2__) || defined (____386BSD____)
- /* The macro _VA_LIST is used in SCO Unix 3.2. */
- #ifndef _VA_LIST
- #if !(defined (__BSD_NET2__) || defined (____386BSD____))
- #define _VA_LIST_
- #endif
- #define _VA_LIST
- typedef __gnuc_va_list va_list;
- #endif /* not _VA_LIST */
- #endif /* not _VA_LIST_ */
-
- #endif /* not __SVR4_2__ */
-
- /* The next BSD release (if there is one) wants this symbol to be
- undefined instead of _VA_LIST_. */
- #ifdef _BSD_VA_LIST
- #undef _BSD_VA_LIST
- #endif
-
- #endif /* __GNUC__ */
--- 1 ----
diff -r2cN gcc-2.3.3/machmode.h my-gcc-2.3.3/machmode.h
*** gcc-2.3.3/machmode.h Sun Aug 2 02:59:22 1992
--- my-gcc-2.3.3/machmode.h Sat Nov 28 22:30:46 1992
***************
*** 84,88 ****
/* Get the name of mode MODE as a string. */
! extern char *mode_name[];
#define GET_MODE_NAME(MODE) (mode_name[(int)(MODE)])
--- 84,88 ----
/* Get the name of mode MODE as a string. */
! extern char * const mode_name[];
#define GET_MODE_NAME(MODE) (mode_name[(int)(MODE)])
***************
*** 93,97 ****
(integer, floating, complex, etc.) */
! extern enum mode_class mode_class[];
#define GET_MODE_CLASS(MODE) (mode_class[(int)(MODE)])
--- 93,97 ----
(integer, floating, complex, etc.) */
! extern const enum mode_class mode_class[];
#define GET_MODE_CLASS(MODE) (mode_class[(int)(MODE)])
***************
*** 98,102 ****
/* Get the size in bytes of an object of mode MODE. */
! extern int mode_size[];
#define GET_MODE_SIZE(MODE) (mode_size[(int)(MODE)])
--- 98,102 ----
/* Get the size in bytes of an object of mode MODE. */
! extern const int mode_size[];
#define GET_MODE_SIZE(MODE) (mode_size[(int)(MODE)])
***************
*** 103,107 ****
/* Get the size in bytes of the basic parts of an object of mode MODE. */
! extern int mode_unit_size[];
#define GET_MODE_UNIT_SIZE(MODE) (mode_unit_size[(int)(MODE)])
--- 103,107 ----
/* Get the size in bytes of the basic parts of an object of mode MODE. */
! extern const int mode_unit_size[];
#define GET_MODE_UNIT_SIZE(MODE) (mode_unit_size[(int)(MODE)])
***************
*** 125,129 ****
/* Get the next wider natural mode (eg, QI -> HI -> SI -> DI -> TI). */
! extern enum machine_mode mode_wider_mode[];
#define GET_MODE_WIDER_MODE(MODE) (mode_wider_mode[(int)(MODE)])
--- 125,129 ----
/* Get the next wider natural mode (eg, QI -> HI -> SI -> DI -> TI). */
! extern const enum machine_mode mode_wider_mode[];
#define GET_MODE_WIDER_MODE(MODE) (mode_wider_mode[(int)(MODE)])
diff -r2cN gcc-2.3.3/print-tree.c my-gcc-2.3.3/print-tree.c
*** gcc-2.3.3/print-tree.c Sat Oct 24 00:09:26 1992
--- my-gcc-2.3.3/print-tree.c Sat Nov 28 22:30:48 1992
***************
*** 25,29 ****
extern char **tree_code_name;
! extern char *mode_name[];
void print_node ();
--- 25,29 ----
extern char **tree_code_name;
! extern char *const mode_name[];
void print_node ();
diff -r2cN gcc-2.3.3/protoize.c my-gcc-2.3.3/protoize.c
*** gcc-2.3.3/protoize.c Sat Oct 17 20:50:54 1992
--- my-gcc-2.3.3/protoize.c Sun Nov 29 20:16:59 1992
***************
*** 79,83 ****
--- 79,86 ----
extern int errno;
+ #ifndef HAVE_STRERROR
extern char *sys_errlist[];
+ #define strerror(err) sys_errlist[err]
+ #endif
extern char *version_string;
***************
*** 777,782 ****
--- 780,790 ----
struct default_include *p;
+ #ifdef FILE_NAME_ABSOLUTE_P
+ if (! FILE_NAME_ABSOLUTE_P (path))
+ abort ();
+ #else
if (path[0] != '/')
abort (); /* Must be an absolutized filename. */
+ #endif
for (p = include_defaults; p->fname; p++)
***************
*** 1205,1209 ****
--- 1213,1221 ----
const char *src_p;
+ #ifdef FILE_NAME_ABSOLUTE_P
+ if (! FILE_NAME_ABSOLUTE_P (rel_filename))
+ #else
if (rel_filename[0] != '/')
+ #endif
{
src_p = cwd2;
***************
*** 1407,1411 ****
{
fprintf (stderr, "%s: %s: can't get status: %s\n",
! pname, shortpath (NULL, filename), sys_errlist[errno]);
stat_buf.st_mtime = (time_t) -1;
}
--- 1419,1423 ----
{
fprintf (stderr, "%s: %s: can't get status: %s\n",
! pname, shortpath (NULL, filename), strerror (errno));
stat_buf.st_mtime = (time_t) -1;
}
***************
*** 1468,1471 ****
--- 1480,1502 ----
}
+ /* Use this macro to advance a char * over the filename part in a line
+ read from an aux-info file. */
+
+ #ifndef amigados
+ /* Version for file systems where the colon has no special meaning */
+ #define ADVANCE_PAST_FILENAME(CP) \
+ while (* (CP) != ':') (CP)++
+ #else
+ /* Have to heuristically decide whether the colon is part of the filename
+ or whether it serves to delimit the filename from the line number. If
+ it's the latter case, then the character following the colon *must*
+ be a digit. Note that this heuristic fails if the filename starts
+ with a digit. */
+ #define ADVANCE_PAST_FILENAME(CP) \
+ while ((CP)[0] != ':' || !isdigit ((CP)[1])) \
+ (CP)++;
+ #endif
+
+
/* Given a line from an aux info file, and a time at which the aux info
file it came from was created, check to see if the item described in
***************
*** 1489,1494 ****
const char *filename_start = p = l + 3;
! while (*p != ':')
! p++;
filename = (char *) alloca ((size_t) (p - filename_start) + 1);
strncpy (filename, filename_start, (size_t) (p - filename_start));
--- 1520,1524 ----
const char *filename_start = p = l + 3;
! ADVANCE_PAST_FILENAME (p);
filename = (char *) alloca ((size_t) (p - filename_start) + 1);
strncpy (filename, filename_start, (size_t) (p - filename_start));
***************
*** 1547,1552 ****
char *filename;
! while (*p != ':')
! p++;
filename = (char *) alloca ((size_t) (p - filename_start) + 1);
strncpy (filename, filename_start, (size_t) (p - filename_start));
--- 1577,1581 ----
char *filename;
! ADVANCE_PAST_FILENAME (p);
filename = (char *) alloca ((size_t) (p - filename_start) + 1);
strncpy (filename, filename_start, (size_t) (p - filename_start));
***************
*** 2001,2005 ****
{
fprintf (stderr, "%s: could not fork process: %s\n",
! pname, sys_errlist[errno]);
return 0;
}
--- 2030,2034 ----
{
fprintf (stderr, "%s: could not fork process: %s\n",
! pname, strerror (errno));
return 0;
}
***************
*** 2029,2033 ****
{
fprintf (stderr, "%s: wait failed: %s\n",
! pname, sys_errlist[errno]);
return 0;
}
--- 2058,2062 ----
{
fprintf (stderr, "%s: wait failed: %s\n",
! pname, strerror (errno));
return 0;
}
***************
*** 2056,2060 ****
write (f, compile_params[0], strlen (compile_params[0]));
write (f, ": ", 2);
! write (f, sys_errlist[e], strlen (sys_errlist[e]));
write (f, "\n", 1);
_exit (1);
--- 2085,2089 ----
write (f, compile_params[0], strlen (compile_params[0]));
write (f, ": ", 2);
! write (f, strerror (e), strlen (strerror (e)));
write (f, "\n", 1);
_exit (1);
***************
*** 2116,2120 ****
fprintf (stderr, "%s: can't read aux info file `%s': %s\n",
pname, shortpath (NULL, aux_info_filename),
! sys_errlist[errno]);
errors++;
return;
--- 2145,2149 ----
fprintf (stderr, "%s: can't read aux info file `%s': %s\n",
pname, shortpath (NULL, aux_info_filename),
! strerror (errno));
errors++;
return;
***************
*** 2144,2148 ****
fprintf (stderr, "%s: can't read aux info file `%s': %s\n",
pname, shortpath (NULL, aux_info_filename),
! sys_errlist[errno]);
errors++;
return;
--- 2173,2177 ----
fprintf (stderr, "%s: can't read aux info file `%s': %s\n",
pname, shortpath (NULL, aux_info_filename),
! strerror (errno));
errors++;
return;
***************
*** 2159,2163 ****
fprintf (stderr, "%s: can't get status of aux info file `%s': %s\n",
pname, shortpath (NULL, aux_info_filename),
! sys_errlist[errno]);
errors++;
return;
--- 2188,2192 ----
fprintf (stderr, "%s: can't get status of aux info file `%s': %s\n",
pname, shortpath (NULL, aux_info_filename),
! strerror (errno));
errors++;
return;
***************
*** 2186,2190 ****
fprintf (stderr, "%s: can't get status of aux info file `%s': %s\n",
pname, shortpath (NULL, base_source_filename),
! sys_errlist[errno]);
errors++;
return;
--- 2215,2219 ----
fprintf (stderr, "%s: can't get status of aux info file `%s': %s\n",
pname, shortpath (NULL, base_source_filename),
! strerror (errno));
errors++;
return;
***************
*** 2207,2211 ****
fprintf (stderr, "%s: can't open aux info file `%s' for reading: %s\n",
pname, shortpath (NULL, aux_info_filename),
! sys_errlist[errno]);
return;
}
--- 2236,2240 ----
fprintf (stderr, "%s: can't open aux info file `%s' for reading: %s\n",
pname, shortpath (NULL, aux_info_filename),
! strerror (errno));
return;
}
***************
*** 2223,2227 ****
fprintf (stderr, "%s: error reading aux info file `%s': %s\n",
pname, shortpath (NULL, aux_info_filename),
! sys_errlist[errno]);
free (aux_info_base);
close (aux_info_file);
--- 2252,2256 ----
fprintf (stderr, "%s: error reading aux info file `%s': %s\n",
pname, shortpath (NULL, aux_info_filename),
! strerror (errno));
free (aux_info_base);
close (aux_info_file);
***************
*** 2235,2239 ****
fprintf (stderr, "%s: error closing aux info file `%s': %s\n",
pname, shortpath (NULL, aux_info_filename),
! sys_errlist[errno]);
free (aux_info_base);
close (aux_info_file);
--- 2264,2268 ----
fprintf (stderr, "%s: error closing aux info file `%s': %s\n",
pname, shortpath (NULL, aux_info_filename),
! strerror (errno));
free (aux_info_base);
close (aux_info_file);
***************
*** 2249,2253 ****
fprintf (stderr, "%s: can't delete aux info file `%s': %s\n",
pname, shortpath (NULL, aux_info_filename),
! sys_errlist[errno]);
/* Save a pointer into the first line of the aux_info file which
--- 2278,2282 ----
fprintf (stderr, "%s: can't delete aux info file `%s': %s\n",
pname, shortpath (NULL, aux_info_filename),
! strerror (errno));
/* Save a pointer into the first line of the aux_info file which
***************
*** 2261,2265 ****
char *p = aux_info_base;
! while (*p != ':')
p++;
p++;
--- 2290,2296 ----
char *p = aux_info_base;
! /* have to make sure at least one space is following the colon to make
! sure the colon is not part of the filename */
! while (*p != ':' && p[1] != ' ')
p++;
p++;
***************
*** 2275,2279 ****
--- 2306,2314 ----
aux_info_second_line = p;
aux_info_relocated_name = 0;
+ #ifdef FILE_NAME_ABSOLUTE_P
+ if (! FILE_NAME_ABSOLUTE_P (invocation_filename))
+ #else
if (invocation_filename[0] != '/')
+ #endif
{
/* INVOCATION_FILENAME is relative;
***************
*** 2315,2319 ****
fprintf (stderr, "%s: can't delete file `%s': %s\n",
pname, shortpath (NULL, aux_info_filename),
! sys_errlist[errno]);
return;
}
--- 2350,2354 ----
fprintf (stderr, "%s: can't delete file `%s': %s\n",
pname, shortpath (NULL, aux_info_filename),
! strerror (errno));
return;
}
***************
*** 2363,2367 ****
/* Check an individual filename for a .c suffix. If the filename has this
! suffix, rename the file such that its suffix is changed to .C. This
function implements the -C option. */
--- 2398,2402 ----
/* Check an individual filename for a .c suffix. If the filename has this
! suffix, rename the file such that its suffix is changed to .cc. This
function implements the -C option. */
***************
*** 2372,2376 ****
const char *filename = hp->symbol;
int last_char_index = strlen (filename) - 1;
! char *const new_filename = (char *) alloca (strlen (filename) + 1);
/* Note that we don't care here if the given file was converted or not. It
--- 2407,2411 ----
const char *filename = hp->symbol;
int last_char_index = strlen (filename) - 1;
! char *const new_filename = (char *) alloca (strlen (filename) + 2);
/* Note that we don't care here if the given file was converted or not. It
***************
*** 2384,2389 ****
strcpy (new_filename, filename);
! new_filename[last_char_index] = 'C';
if (my_link (filename, new_filename) == -1)
{
--- 2419,2441 ----
strcpy (new_filename, filename);
! strcat (new_filename + last_char_index, "cc");
+ /* use rename(2) if available !! Update config files to include HAVE_rename
+ if the used OS provides it. Advantages are: it's atomic, it's one
+ system call compared to two. */
+
+ #ifdef HAVE_rename
+ /* if the mentioned systems (POSIX 1003.1-1988) have rename(2), this has
+ to be changed to `my_rename' as well. */
+
+ if (rename (filename, new_filename) == -1)
+ {
+ fprintf (stderr, "%s: warning: can't rename file `%s' to `%s': %s\n",
+ pname, shortpath (NULL, filename),
+ shortpath (NULL, new_filename), strerror (errno));
+ errors++;
+ return;
+ }
+ #else
if (my_link (filename, new_filename) == -1)
{
***************
*** 2390,2394 ****
fprintf (stderr, "%s: warning: can't link file `%s' to `%s': %s\n",
pname, shortpath (NULL, filename),
! shortpath (NULL, new_filename), sys_errlist[errno]);
errors++;
return;
--- 2442,2446 ----
fprintf (stderr, "%s: warning: can't link file `%s' to `%s': %s\n",
pname, shortpath (NULL, filename),
! shortpath (NULL, new_filename), strerror (errno));
errors++;
return;
***************
*** 2398,2405 ****
{
fprintf (stderr, "%s: warning: can't delete file `%s': %s\n",
! pname, shortpath (NULL, filename), sys_errlist[errno]);
errors++;
return;
}
}
--- 2450,2458 ----
{
fprintf (stderr, "%s: warning: can't delete file `%s': %s\n",
! pname, shortpath (NULL, filename), strerror (errno));
errors++;
return;
}
+ #endif
}
***************
*** 4094,4098 ****
{
fprintf (stderr, "%s: can't get status for file `%s': %s\n",
! pname, shortpath (NULL, convert_filename), sys_errlist[errno]);
return;
}
--- 4147,4151 ----
{
fprintf (stderr, "%s: can't get status for file `%s': %s\n",
! pname, shortpath (NULL, convert_filename), strerror (errno));
return;
}
***************
*** 4129,4133 ****
fprintf (stderr, "%s: can't open file `%s' for reading: %s\n",
pname, shortpath (NULL, convert_filename),
! sys_errlist[errno]);
return;
}
--- 4182,4186 ----
fprintf (stderr, "%s: can't open file `%s' for reading: %s\n",
pname, shortpath (NULL, convert_filename),
! strerror (errno));
return;
}
***************
*** 4142,4146 ****
fprintf (stderr, "\n%s: error reading input file `%s': %s\n",
pname, shortpath (NULL, convert_filename),
! sys_errlist[errno]);
return;
}
--- 4195,4199 ----
fprintf (stderr, "\n%s: error reading input file `%s': %s\n",
pname, shortpath (NULL, convert_filename),
! strerror (errno));
return;
}
***************
*** 4175,4179 ****
fprintf (stderr, "%s: can't create/open clean file `%s': %s\n",
pname, shortpath (NULL, clean_filename),
! sys_errlist[errno]);
return;
}
--- 4228,4232 ----
fprintf (stderr, "%s: can't create/open clean file `%s': %s\n",
pname, shortpath (NULL, clean_filename),
! strerror (errno));
return;
}
***************
*** 4183,4187 ****
if (write (clean_file, new_clean_text_base, clean_size) != clean_size)
fprintf (stderr, "%s: error writing file `%s': %s\n",
! pname, shortpath (NULL, clean_filename), sys_errlist[errno]);
close (clean_file);
--- 4236,4240 ----
if (write (clean_file, new_clean_text_base, clean_size) != clean_size)
fprintf (stderr, "%s: error writing file `%s': %s\n",
! pname, shortpath (NULL, clean_filename), strerror (errno));
close (clean_file);
***************
*** 4286,4290 ****
shortpath (NULL, convert_filename),
shortpath (NULL, new_filename),
! sys_errlist[errno]);
return;
}
--- 4339,4343 ----
shortpath (NULL, convert_filename),
shortpath (NULL, new_filename),
! strerror (errno));
return;
}
***************
*** 4295,4299 ****
{
fprintf (stderr, "%s: can't delete file `%s': %s\n",
! pname, shortpath (NULL, convert_filename), sys_errlist[errno]);
return;
}
--- 4348,4352 ----
{
fprintf (stderr, "%s: can't delete file `%s': %s\n",
! pname, shortpath (NULL, convert_filename), strerror (errno));
return;
}
***************
*** 4308,4312 ****
fprintf (stderr, "%s: can't create/open output file `%s': %s\n",
pname, shortpath (NULL, convert_filename),
! sys_errlist[errno]);
return;
}
--- 4361,4365 ----
fprintf (stderr, "%s: can't create/open output file `%s': %s\n",
pname, shortpath (NULL, convert_filename),
! strerror (errno));
return;
}
***************
*** 4320,4324 ****
fprintf (stderr, "%s: error writing file `%s': %s\n",
pname, shortpath (NULL, convert_filename),
! sys_errlist[errno]);
}
--- 4373,4377 ----
fprintf (stderr, "%s: error writing file `%s': %s\n",
pname, shortpath (NULL, convert_filename),
! strerror (errno));
}
***************
*** 4337,4341 ****
if (my_chmod ((char *)convert_filename, stat_buf.st_mode) == -1)
fprintf (stderr, "%s: can't change mode of file `%s': %s\n",
! pname, shortpath (NULL, convert_filename), sys_errlist[errno]);
/* Note: We would try to change the owner and group of the output file
--- 4390,4394 ----
if (my_chmod ((char *)convert_filename, stat_buf.st_mode) == -1)
fprintf (stderr, "%s: can't change mode of file `%s': %s\n",
! pname, shortpath (NULL, convert_filename), strerror (errno));
/* Note: We would try to change the owner and group of the output file
***************
*** 4480,4484 ****
{
fprintf (stderr, "%s: cannot get working directory: %s\n",
! pname, sys_errlist[errno]);
exit (1);
}
--- 4533,4537 ----
{
fprintf (stderr, "%s: cannot get working directory: %s\n",
! pname, strerror (errno));
exit (1);
}
diff -r2cN gcc-2.3.3/rtl.c my-gcc-2.3.3/rtl.c
*** gcc-2.3.3/rtl.c Sat Sep 19 19:33:11 1992
--- my-gcc-2.3.3/rtl.c Sat Nov 28 22:30:57 1992
***************
*** 50,54 ****
#define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS) NAME ,
! char *rtx_name[] = {
#include "rtl.def" /* rtl expressions are documented here */
};
--- 50,54 ----
#define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS) NAME ,
! char * const rtx_name[] = {
#include "rtl.def" /* rtl expressions are documented here */
};
***************
*** 61,65 ****
#define DEF_MACHMODE(SYM, NAME, CLASS, SIZE, UNIT, WIDER) NAME,
! char *mode_name[(int) MAX_MACHINE_MODE] = {
#include "machmode.def"
--- 61,65 ----
#define DEF_MACHMODE(SYM, NAME, CLASS, SIZE, UNIT, WIDER) NAME,
! char * const mode_name[(int) MAX_MACHINE_MODE] = {
#include "machmode.def"
***************
*** 77,81 ****
#define DEF_MACHMODE(SYM, NAME, CLASS, SIZE, UNIT, WIDER) CLASS,
! enum mode_class mode_class[(int) MAX_MACHINE_MODE] = {
#include "machmode.def"
};
--- 77,81 ----
#define DEF_MACHMODE(SYM, NAME, CLASS, SIZE, UNIT, WIDER) CLASS,
! const enum mode_class mode_class[(int) MAX_MACHINE_MODE] = {
#include "machmode.def"
};
***************
*** 88,92 ****
#define DEF_MACHMODE(SYM, NAME, CLASS, SIZE, UNIT, WIDER) SIZE,
! int mode_size[(int) MAX_MACHINE_MODE] = {
#include "machmode.def"
};
--- 88,92 ----
#define DEF_MACHMODE(SYM, NAME, CLASS, SIZE, UNIT, WIDER) SIZE,
! const int mode_size[(int) MAX_MACHINE_MODE] = {
#include "machmode.def"
};
***************
*** 99,103 ****
#define DEF_MACHMODE(SYM, NAME, CLASS, SIZE, UNIT, WIDER) UNIT,
! int mode_unit_size[(int) MAX_MACHINE_MODE] = {
#include "machmode.def" /* machine modes are documented here */
};
--- 99,103 ----
#define DEF_MACHMODE(SYM, NAME, CLASS, SIZE, UNIT, WIDER) UNIT,
! const int mode_unit_size[(int) MAX_MACHINE_MODE] = {
#include "machmode.def" /* machine modes are documented here */
};
***************
*** 112,116 ****
(enum machine_mode) WIDER,
! enum machine_mode mode_wider_mode[(int) MAX_MACHINE_MODE] = {
#include "machmode.def" /* machine modes are documented here */
};
--- 112,116 ----
(enum machine_mode) WIDER,
! const enum machine_mode mode_wider_mode[(int) MAX_MACHINE_MODE] = {
#include "machmode.def" /* machine modes are documented here */
};
***************
*** 131,135 ****
each character describes one operand. */
! char *rtx_format[] = {
/* "*" undefined.
can cause a warning message
--- 131,135 ----
each character describes one operand. */
! char *const rtx_format[] = {
/* "*" undefined.
can cause a warning message
***************
*** 162,166 ****
that rtx code. See rtl.def for documentation on the defined classes. */
! char rtx_class[] = {
#define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS) CLASS,
#include "rtl.def" /* rtl expressions are defined here */
--- 162,166 ----
that rtx code. See rtl.def for documentation on the defined classes. */
! const char rtx_class[] = {
#define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS) CLASS,
#include "rtl.def" /* rtl expressions are defined here */
***************
*** 170,174 ****
/* Names for kinds of NOTEs and REG_NOTEs. */
! char *note_insn_name[] = { "NOTE_INSN_FUNCTION_BEG", "NOTE_INSN_DELETED",
"NOTE_INSN_BLOCK_BEG", "NOTE_INSN_BLOCK_END",
"NOTE_INSN_LOOP_BEG", "NOTE_INSN_LOOP_END",
--- 170,175 ----
/* Names for kinds of NOTEs and REG_NOTEs. */
! char * const note_insn_name[] =
! { "NOTE_INSN_FUNCTION_BEG", "NOTE_INSN_DELETED",
"NOTE_INSN_BLOCK_BEG", "NOTE_INSN_BLOCK_END",
"NOTE_INSN_LOOP_BEG", "NOTE_INSN_LOOP_END",
***************
*** 178,182 ****
"NOTE_INSN_DELETED_LABEL"};
! char *reg_note_name[] = { "", "REG_DEAD", "REG_INC", "REG_EQUIV", "REG_WAS_0",
"REG_EQUAL", "REG_RETVAL", "REG_LIBCALL",
"REG_NONNEG", "REG_NO_CONFLICT", "REG_UNUSED",
--- 179,184 ----
"NOTE_INSN_DELETED_LABEL"};
! char * const reg_note_name[] =
! { "", "REG_DEAD", "REG_INC", "REG_EQUIV", "REG_WAS_0",
"REG_EQUAL", "REG_RETVAL", "REG_LIBCALL",
"REG_NONNEG", "REG_NO_CONFLICT", "REG_UNUSED",
diff -r2cN gcc-2.3.3/rtl.h my-gcc-2.3.3/rtl.h
*** gcc-2.3.3/rtl.h Wed Dec 30 00:13:33 1992
--- my-gcc-2.3.3/rtl.h Mon Dec 28 14:03:44 1992
***************
*** 43,53 ****
#define GET_RTX_LENGTH(CODE) (rtx_length[(int)(CODE)])
! extern char *rtx_name[];
#define GET_RTX_NAME(CODE) (rtx_name[(int)(CODE)])
! extern char *rtx_format[];
#define GET_RTX_FORMAT(CODE) (rtx_format[(int)(CODE)])
! extern char rtx_class[];
#define GET_RTX_CLASS(CODE) (rtx_class[(int)(CODE)])
--- 43,53 ----
#define GET_RTX_LENGTH(CODE) (rtx_length[(int)(CODE)])
! extern char * const rtx_name[];
#define GET_RTX_NAME(CODE) (rtx_name[(int)(CODE)])
! extern char * const rtx_format[];
#define GET_RTX_FORMAT(CODE) (rtx_format[(int)(CODE)])
! extern const char rtx_class[];
#define GET_RTX_CLASS(CODE) (rtx_class[(int)(CODE)])
***************
*** 329,333 ****
/* Names for REG_NOTE's in EXPR_LIST insn's. */
! extern char *reg_note_name[];
#define GET_REG_NOTE_NAME(MODE) (reg_note_name[(int)(MODE)])
--- 329,333 ----
/* Names for REG_NOTE's in EXPR_LIST insn's. */
! extern char *const reg_note_name[];
#define GET_REG_NOTE_NAME(MODE) (reg_note_name[(int)(MODE)])
***************
*** 397,401 ****
/* Names for NOTE insn's other than line numbers. */
! extern char *note_insn_name[];
#define GET_NOTE_INSN_NAME(NOTE_CODE) (note_insn_name[-(NOTE_CODE)])
--- 397,401 ----
/* Names for NOTE insn's other than line numbers. */
! extern char *const note_insn_name[];
#define GET_NOTE_INSN_NAME(NOTE_CODE) (note_insn_name[-(NOTE_CODE)])
Binary files gcc-2.3.3/stage1/cc1 and my-gcc-2.3.3/stage1/cc1 differ
Binary files gcc-2.3.3/stage1/cc1obj and my-gcc-2.3.3/stage1/cc1obj differ
Binary files gcc-2.3.3/stage1/cc1plus and my-gcc-2.3.3/stage1/cc1plus differ
Binary files gcc-2.3.3/stage1/cccp and my-gcc-2.3.3/stage1/cccp differ
Binary files gcc-2.3.3/stage1/cpp and my-gcc-2.3.3/stage1/cpp differ
Binary files gcc-2.3.3/stage1/enquire and my-gcc-2.3.3/stage1/enquire differ
Binary files gcc-2.3.3/stage1/gccs and my-gcc-2.3.3/stage1/gccs differ
Binary files gcc-2.3.3/stage1/genattr and my-gcc-2.3.3/stage1/genattr differ
Binary files gcc-2.3.3/stage1/genattrtab and my-gcc-2.3.3/stage1/genattrtab differ
Binary files gcc-2.3.3/stage1/gencodes and my-gcc-2.3.3/stage1/gencodes differ
Binary files gcc-2.3.3/stage1/genconfig and my-gcc-2.3.3/stage1/genconfig differ
Binary files gcc-2.3.3/stage1/genemit and my-gcc-2.3.3/stage1/genemit differ
Binary files gcc-2.3.3/stage1/genextract and my-gcc-2.3.3/stage1/genextract differ
Binary files gcc-2.3.3/stage1/genflags and my-gcc-2.3.3/stage1/genflags differ
Binary files gcc-2.3.3/stage1/genoutput and my-gcc-2.3.3/stage1/genoutput differ
Binary files gcc-2.3.3/stage1/genpeep and my-gcc-2.3.3/stage1/genpeep differ
Binary files gcc-2.3.3/stage1/genrecog and my-gcc-2.3.3/stage1/genrecog differ
diff -r2cN gcc-2.3.3/toplev.c my-gcc-2.3.3/toplev.c
*** gcc-2.3.3/toplev.c Sat Nov 28 22:10:54 1992
--- my-gcc-2.3.3/toplev.c Sat Nov 28 22:31:03 1992
***************
*** 473,476 ****
--- 473,477 ----
{"writable-strings", &flag_writable_strings, 1},
{"peephole", &flag_no_peephole, 0},
+ {"large-baserel", &flag_pic, 4},
{"force-mem", &flag_force_mem, 1},
{"force-addr", &flag_force_addr, 1},
***************
*** 490,493 ****
--- 491,495 ----
{"pic", &flag_pic, 1},
{"PIC", &flag_pic, 2},
+ {"baserel", &flag_pic, 3},
{"fast-math", &flag_fast_math, 1},
{"common", &flag_no_common, 0},
***************
*** 1454,1457 ****
--- 1456,1462 ----
char *input_name;
{
+ #ifdef FILE_NAME_NONDIRECTORY
+ char *na = FILE_NAME_NONDIRECTORY (input_name);
+ #else
int len = strlen (input_name);
char *na = input_name + len;
***************
*** 1464,1467 ****
--- 1469,1473 ----
na--;
}
+ #endif
#ifdef ASM_OUTPUT_MAIN_SOURCE_FILENAME
***************
*** 3287,3290 ****
--- 3293,3297 ----
#ifndef OS2
#ifndef VMS
+ #ifndef amigados
if (flag_print_mem)
{
***************
*** 3301,3304 ****
--- 3308,3312 ----
#endif /* not USG */
}
+ #endif /* not amigados */
#endif /* not VMS */
#endif /* not OS2 */
diff -r2cN gcc-2.3.3/tree.c my-gcc-2.3.3/tree.c
*** gcc-2.3.3/tree.c Thu Oct 22 12:00:22 1992
--- my-gcc-2.3.3/tree.c Sat Nov 28 22:31:07 1992
***************
*** 247,251 ****
static int next_decl_uid;
! extern char *mode_name[];
void gcc_obstack_init ();
--- 247,251 ----
static int next_decl_uid;
! extern char *const mode_name[];
void gcc_obstack_init ();